Problem with timers and collision.
mast2r1
Member Posts: 2
I'm having a problem with timers on my actor. Basically, this is how the game is;
objective is for a blob to eat items in 3 directions. middle, left and right. 3 buttons for each. I put in timers to hold the position for at least 1 second. However, the timers conflicts with each other. it wont reset the timer when the other buttons are pressed. causing it to be buggy. How can this problem be avoided?
Another problem, I can't find a solution for the items spawning to collide at the right condition. my items are spawned on the bottom middle of the scene with velocity at 3 angles, right, middle, left. the scene has gravity which causes my items to fall as desired. there's no problem for the item to collide with a block on the left or on the right side which basically will determine if the blob will eat or miss eating the items. however, i'm having issues on how to make those items collide with the block in the middle. It should spawn and fly 90 degress up and fall before colliding. but this would only cause the item to collide even before flying up and falling naturally. My understanding is that gamesalad has no Z axis. I have no other idea how to create this event.
Please HELP!
objective is for a blob to eat items in 3 directions. middle, left and right. 3 buttons for each. I put in timers to hold the position for at least 1 second. However, the timers conflicts with each other. it wont reset the timer when the other buttons are pressed. causing it to be buggy. How can this problem be avoided?
Another problem, I can't find a solution for the items spawning to collide at the right condition. my items are spawned on the bottom middle of the scene with velocity at 3 angles, right, middle, left. the scene has gravity which causes my items to fall as desired. there's no problem for the item to collide with a block on the left or on the right side which basically will determine if the blob will eat or miss eating the items. however, i'm having issues on how to make those items collide with the block in the middle. It should spawn and fly 90 degress up and fall before colliding. but this would only cause the item to collide even before flying up and falling naturally. My understanding is that gamesalad has no Z axis. I have no other idea how to create this event.
Please HELP!
Answers
For the collision issue, consider adding an after ___ seconds timer and put your collision rule inside of it. For example, if your actor flies up for half a second before passing the player actor, make the time 0.6 or 0.7 seconds.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User