Page 1 of 1

could someone tell me how to fix this or improve this game

PostPosted: Fri Apr 03, 2009 3:30 am
by Darc
Thanks,
:P

Re: could someone tell me how to fix this or improve this game

PostPosted: Fri Apr 03, 2009 4:00 am
by DST
Sure!

1. Condense your actions. If you have a key>left>ChangeAnimation AND a key>left>script editor, just make one "script editor" for that action, and use the buttons at the bottom of the editor to automatically add things like changeanimation.

2. Do not stack actions. I understand what you were doing, but the way you have it, pressing left + shift triggers the left+shift action, and it ALSO triggers the left action at the same time. You can't have multiples like that.

The only time you want to have more than one entry for a key is to have one that repeats, and one that doesn't repeat at the same time. However, with proper use of actions, even this you won't need very often.

Do it like this: Keydown>space>
variable=1;

Keyup>space>
variable=0; (Where variable is any variable you want to use.)

Then, for keydown>left>
Code: Select all
switch(variable){
case 0:
do this;
break;
case 1:
do that;
break;
}


Now you can combine lots of keys into the left keypress function, or (even better) when you press the shift key, the variable 1 can be used for ANY other keydown or any other event! You can see how condensing events is necessary in order to make games. Otherwise, it gets out of hand.

Before i can move on to point 3, points 1 and 2 need to be fixed, because looking in 15 key actions, some of which overlap functions, is probably way more work than anyone else is going to put into helping your game (and pointless cause you'll just end up in the same boat again).

:D

Re: could someone tell me how to fix this or improve this game

PostPosted: Fri Apr 03, 2009 5:12 pm
by Darc
thanks :)