I'm trying to figure out how to play a bounce_effect file only ONCE when I bump into a wall.
The problem I'm having is that at the moment, when I bump into the wall, the sound will
play. But when I hold the arrow key to keep walking into the wall, the bounce_effect file
will play what sounds like 100 times in a second.
Any ideas on how to overcome this?
1. Made a player object (named obj_player)
2. Made a ghost object (named obj_enemy4)
3. In end step event for the ghost I did this: (Move towards (action) > Applies to self (checked) > x: obj_player.x > y: obj_player.y > speed: 2 > relative (not checked))
When I try to run the game though, I get this error:
FATAL ERROR in
action number 1
of End Step Event
for object obj_enemy4:
COMPILATION ERROR in argument 0
Error in expression:obj_player.x
position 12: Variable name expected.
Does anyone know how I can fix this? I'm not trying to do anything complicated,
just trying to get the ghost to slowly follow the player around the map (maze type game).
The ghost can hover through walls etc, as it does. I looked up how to do it, and
what I did was the solution I found.
If hspeed larger than 0 > right animation
If hspeed smaller than 0 > left animation
If vspeed larger than 0 > down animation
If vspeed smaller than 0 > up animation
However, the actual animation isn't playing. It's just a static
image. I think the reason for this is because I am using the
step event, which checks every step, starting the animation
from the start again. Any ideas to fix this?
Having a small problem here. I have it set so that the user has to click on the image in the story to go to the next frame (or page) in it. But when I click on it while testing, it moves on to the last frame immediately. Does this mean that I have to do a separate room for each frame, or can I fix this?
I made an event for first frame image (object) that if mouse clicks on it, the second frame image would appear at (0,0) and first frame image would be destroyed. Doing the same for 2nd frame image, to make 3rd frame image appear and so on. What am I doing wrong?