Game for arcade cabinet

Talk about making games.

Re: Game for arcade cabinet

Postby NightOfHorror » Thu Mar 20, 2014 12:04 pm

Awesome.
viewtopic.php?f=2&t=12136
"I have not failed. I just found 10,000 ways that wont work." quoted by Thomas Edison.
Over the year, I decided my motto for me is I am knowledgeable, but not practical.
User avatar
NightOfHorror
 
Posts: 1823
Joined: Fri Aug 27, 2010 2:50 am
Location: Cedar Hill, MO, of the USA
Score: 51 Give a positive score

Re: Game for arcade cabinet

Postby retroarcade » Thu Mar 20, 2014 3:49 pm

Thanks.


Talking about Windows, I've tried to use 7 instead of XP and it works very fine.
retroarcade
 
Posts: 18
Joined: Sat Mar 08, 2014 2:20 pm
Location: Italy - Germany
Score: 0 Give a positive score

Re: Game for arcade cabinet

Postby bat78 » Thu Mar 20, 2014 8:50 pm

Lovely ^^
The future of "Game-Editor" here
User avatar
bat78
 
Posts: 816
Joined: Sun Dec 14, 2008 9:13 pm
Location: Bulgaria, Sofia
Score: 88 Give a positive score

Re: Game for arcade cabinet

Postby retroarcade » Sun Mar 23, 2014 5:12 pm

Hi everybody.

Here is my new daily issue. Hope someone can help or point me to a specific thread.

My hero sprite must shoot an enemy.
When the enemy receives the bullet,
A) I want it to be substitute with a transition animation (with all events suspended)
B) and, after some time,
C) it must disappear.

I' ve tried "change animation" and "destroy actor" in the same scripting but the enemy only disappears.
Maybe I should use timer (and even tried) but couldn't use it properly.

Thanks guys!
retroarcade
 
Posts: 18
Joined: Sat Mar 08, 2014 2:20 pm
Location: Italy - Germany
Score: 0 Give a positive score

Re: Game for arcade cabinet

Postby CrackedP0t » Sun Mar 23, 2014 6:26 pm

Putting ChangeAnimation and DestroyActor in the same script will execute both of them in the exact same frame, so you won't be able to see the animation before it gets destroyed. (If you didn't know, every script you run will run in a single frame; a little different from other tools.)
So, in order to have the animation play, then destroy the actor, here's what I would do:
When the event occurs that you want to trigger the sequence, change the animation to the dying one.
The, add an Animation Finish event with the dying one as the animation, and destroy the actor in it.
To disable the events, use the EventDisable function in the first event and then enable the Animation Finish event and any others you need.
Here's the code that would be used:
In the event when the actor needs to die:
Code: Select all
EventDisable("Event Actor", EVENTALL);
EventEnable("Event Actor", EVENTANIMATIONFINISH);
ChangeAnimation("Event Actor", "dying", FORWARD);

Then, in the Animation Finish event (with "dying" or whatever it is as the animation):
Code: Select all
DestroyActor("Event Actor");


If you have any questions, please ask them!
/人 ◕‿‿◕ 人\
Fang Pictures, my game development company:
http://fangpictures.comuf.com
User avatar
CrackedP0t
 
Posts: 157
Joined: Mon Dec 30, 2013 5:49 pm
Location: Crested Butte, CO (The US of A)
Score: 8 Give a positive score

Re: Game for arcade cabinet

Postby retroarcade » Sun Mar 23, 2014 7:20 pm

That's the solution! It works perfectly.

Bravo!
retroarcade
 
Posts: 18
Joined: Sat Mar 08, 2014 2:20 pm
Location: Italy - Germany
Score: 0 Give a positive score

Re: Game for arcade cabinet

Postby retroarcade » Tue Apr 01, 2014 8:24 am

Hi guys.

Could please someone solve this puzzle?

I would like the player to hit the spacebar and get one credit and, when he wants to start playing, he should hit return (in this case, he loses one credit and begins to play).

So for +1 credit
key down / spacebar / script editor / credits.textNumber=credits.textNumber+1;

and it works fine: the number of credits increases by one.

Then the player starts a game and loses a credit:

key down / return / script editor / credits.textNumber=credits.textNumber-1;

and surprise the number of credits decreases by 2 ( the player has 3 credits, he hits return and in fact loses two credits).

:?: Strange, isn't it?
retroarcade
 
Posts: 18
Joined: Sat Mar 08, 2014 2:20 pm
Location: Italy - Germany
Score: 0 Give a positive score

Re: Game for arcade cabinet

Postby MrJolteon » Tue Apr 01, 2014 8:47 am

First, declare a variable called "credit".
Then, on key down -> space, put
Code: Select all
credit++;

key down -> return:
Code: Select all
if(credit>=1)
{
    credit-1;
    //start the game
}
//this next part can be skipped if you don't want to run any code if the player does not have enough credits
else if(credit==0)
{
    //the code you want to execute if the player does not have enough credits
}

draw actor:
Code: Select all
credits.textNumber=credit;
Join us on Discord!
Game Editor 2
These are the best ways to reach me these days


Your local Community Janitor, always lurking in the shadows...
User avatar
MrJolteon
 
Posts: 2326
Joined: Sat Aug 09, 2008 3:25 pm
Location: Stranded under endless sky
Score: 105 Give a positive score

Re: Game for arcade cabinet

Postby lcl » Tue Apr 01, 2014 9:39 am

Yeah, MrJolteon has the correct answer, you shouldn't use textNumber as an actual variable in a game, because it acts funny, as you noticed. textNumber is only usable for showing things on the screen.

Anyway, Jolt, your code has one error. Instead of
Code: Select all
credit - 1;

It should be
Code: Select all
credit -= 1;

Which is the same as writing credit = credit - 1;

:)
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: Game for arcade cabinet

Postby retroarcade » Tue Apr 01, 2014 12:02 pm

Thanks guys.

I've tried and got the same issue (decrease by two).

But can't test anymore (I'm working...).

I'll see tonight.
retroarcade
 
Posts: 18
Joined: Sat Mar 08, 2014 2:20 pm
Location: Italy - Germany
Score: 0 Give a positive score

Re: Game for arcade cabinet

Postby bat78 » Tue Apr 01, 2014 4:31 pm

MrJolteon wrote:First, declare a variable called "credit".
Then, on key down -> space, put
Code: Select all
credit++;

key down -> return:
Code: Select all
if(credit>=1)
{
    credit-1;
    //start the game
}
//this next part can be skipped if you don't want to run any code if the player does not have enough credits
else if(credit==0)
{
    //the code you want to execute if the player does not have enough credits
}

draw actor:
Code: Select all
credits.textNumber=credit;

______________________________________________________________________________________________________________
I suggest using shorter code:

First, declare a variable called "credit".
Then, on key down -> (repeat dissabled) space, put
Code: Select all
credit++;

key down -> (repeat dissabled) return:
Code: Select all
if(credit>=1)
{
    credit--;
    //start the game
}
//this next part can be skipped if you don't want to run any code if the player does not have enough credits
else
{
    //the code you want to execute if the player does not have enough credits
}

draw actor:
Code: Select all
credits.textNumber=credit;
The future of "Game-Editor" here
User avatar
bat78
 
Posts: 816
Joined: Sun Dec 14, 2008 9:13 pm
Location: Bulgaria, Sofia
Score: 88 Give a positive score

Re: Game for arcade cabinet

Postby retroarcade » Tue Apr 01, 2014 6:43 pm

Thanks everybody.

+ 1 for your help!

:D it is so good when all works fine!
retroarcade
 
Posts: 18
Joined: Sat Mar 08, 2014 2:20 pm
Location: Italy - Germany
Score: 0 Give a positive score

Re: Game for arcade cabinet

Postby bat78 » Tue Apr 01, 2014 11:46 pm

Please tell us if you can't figure out something, we'll be glad to help asap. =)
The future of "Game-Editor" here
User avatar
bat78
 
Posts: 816
Joined: Sun Dec 14, 2008 9:13 pm
Location: Bulgaria, Sofia
Score: 88 Give a positive score

Re: Game for arcade cabinet

Postby retroarcade » Wed Apr 02, 2014 12:20 pm

Well I followed your methods and it is working fine.

Now I can focus on some funny graphics for the game.
retroarcade
 
Posts: 18
Joined: Sat Mar 08, 2014 2:20 pm
Location: Italy - Germany
Score: 0 Give a positive score

Re: Game for arcade cabinet

Postby Zivouhr » Sat May 31, 2014 2:27 am

Great looking Arcade Cabinet. I can imagine that took some time to build. Sad to see a lot of the Arcades have disappeared since home consoles and PC graphics have advanced past the arcades. Back in the old days, arcades were the place to go for the latest graphics, but these days, it's right at home; which is a good thing, but it would be nice to have both too. 8)
The Controller cake looks good too. :mrgreen:
City of Rott Game created on Game Editor http://cityofrott.wordpress.com/
User avatar
Zivouhr
 
Posts: 549
Joined: Sat May 17, 2014 2:12 pm
Score: 59 Give a positive score

Previous

Return to Game Development

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron