My apps about 50% done! But i have a few questions. (please help)
DanielAvni
Member Posts: 114
My apps about half way done! but i have a few questions.
1st question is that im making it so when the ball collides with the enemy it gets destroyed and plays an animation. But it always plays it like .001 seconds haha i cant even see what happens i tried making it so after like 2 secs of the collision the actor is destroyed but that didn't work ether..
2nd Question is how do i make it so the timer randomly spawns the actor between 1,4 seconds.
(i tried random(1,4))
Last and most important questions is that i have it when that theres a ball that i pull back and it shoots. But i want it so that when i touch/press on the cannon it spawns the cannonball and it drags back with ur finger. And once i release it plays an animation. I was thinking maybe making the ball invisible until pressed or something i dunno what do you guys think?
Thanks DanielA!
1st question is that im making it so when the ball collides with the enemy it gets destroyed and plays an animation. But it always plays it like .001 seconds haha i cant even see what happens i tried making it so after like 2 secs of the collision the actor is destroyed but that didn't work ether..
2nd Question is how do i make it so the timer randomly spawns the actor between 1,4 seconds.
(i tried random(1,4))
Last and most important questions is that i have it when that theres a ball that i pull back and it shoots. But i want it so that when i touch/press on the cannon it spawns the cannonball and it drags back with ur finger. And once i release it plays an animation. I was thinking maybe making the ball invisible until pressed or something i dunno what do you guys think?
Thanks DanielA!
Comments
Random spawning should work the way you have it. not sure on that one.
I think that using the pull back method on the cannon makes a lot of sense. Just put a change attribute behavior in the "when touch is pressed" rule that changes alpha to 1 so that it becomes visible (have it set to 0 initially).
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
@ QS - I knew absolutely nada when I started about 9 months ago and I am no expert now, but because of people like you on this forum I have been able to make games that I can be proud of. So I am just paying it forward.
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
In canon:
RULE
when touch is pressed
-change attribute game.cannoinisalive to true
etc.
What i was thinking is.
I made a game attribute (boolean) called Cannon Ball Alive
Cannon Ball:
Rule actor receives event: overlaps or collides with wall (wall is outside of the map)\
Change Attribut:Cannon Ball Alive to False
Destroy this actor
Spawner:
Rule:attribute:Cannon Ball is Alive is false
spawn:cannonBall
Change Attribute:Cannon Ball is Alive to True.
Thats w what i did so that when the cannon ball hits the wall a new one spawns...
Rule
When actor collides with wall
Change attribute self.positionX to X start position
Change attribute self.positionY to Y start posiition
http://gamesalad.com/game/play/39759