Page 1 of 2
probably old but....

Posted:
Tue Apr 29, 2008 9:01 pm
by wolfeh66
Im very new to this, but i made an event for a space invaders game and i managed to make key down repeat but not key up.
EDIT: i have to repeatedly stab the left arrow to make it go left
Help please?
Thanks
Re: probably old but....

Posted:
Tue Apr 29, 2008 9:05 pm
by Caaz Games
what do you want it to do?
key up makes an action happen when the key is lifted like how keydown works.
for the caveman demo the keydown event made it change to running animation keyup made it change back to standing
Re: probably old but....

Posted:
Tue Apr 29, 2008 9:07 pm
by wolfeh66
quick reply!
i want it to go left, i typed x = x - 4 to make it go left but it has repeat eneable/disable so i cant hold the left key and make it go continusouly (sp) left
Re: probably old but....

Posted:
Tue Apr 29, 2008 9:09 pm
by Caaz Games
oh, if you want the ship to go left set it to repeat
Re: probably old but....

Posted:
Tue Apr 29, 2008 9:13 pm
by wolfeh66
but i cant find repeat, thats the problem
it was near the bottom of the window for key down but it just isnt there for key up
Re: probably old but....

Posted:
Tue Apr 29, 2008 9:15 pm
by Caaz Games
Key up doesn't have a repeat, use keydown for making the actor move.
Re: probably old but....

Posted:
Tue Apr 29, 2008 9:17 pm
by wolfeh66
so what other key does have a repeat?
Re: probably old but....

Posted:
Tue Apr 29, 2008 9:21 pm
by Caaz Games
?

? ok im confused sort of...heres how you make an actor move, go to add event>Key down(Repeat)>Script edtior>
- Code: Select all
x=x-4
then click add(immediate action).
Re: probably old but....

Posted:
Tue Apr 29, 2008 9:24 pm
by wolfeh66
yeah, i did that with a + intstead of - to make him go right by pressing right arrow key
but my probelm is, im not sure of a key to make him go left with x = x - 4
confusing now

Re: probably old but....

Posted:
Tue Apr 29, 2008 9:25 pm
by Caaz Games
oh maybe the left arrow key?
Re: probably old but....

Posted:
Tue Apr 29, 2008 9:26 pm
by wolfeh66
yes but key up doesnt repeat so i cant hold the left arrow key to make him go left, i have to repeatedly stab the left arrow key
Re: probably old but....

Posted:
Tue Apr 29, 2008 9:27 pm
by Caaz Games
use keydown
Re: probably old but....

Posted:
Tue Apr 29, 2008 9:28 pm
by wolfeh66
but ive used that to make him go right with the right arrow key
Re: probably old but....

Posted:
Tue Apr 29, 2008 9:32 pm
by wolfeh66
will have to check for answer tomorrow
bye for now
Re: probably old but....

Posted:
Tue Apr 29, 2008 9:34 pm
by Caaz Games
just do it again

look at the space invaders demo. save your space invaders and load the space invaders it should be where game editor is located on your computer probably program files, then in tutorials open it up and then click on the player ship and look at edit events there is multiple buttons on keydown.