Need help with gamesalad for (Windows)
jobei
Member Posts: 39
Hey guys, I'm stuck on this code, I hope someone that use the window gamesalad can help me out.
I have two actors, actor A and actor B, I set them across from each other. actor A is on the right side of the screen and actor B is on the left side. Now I dont want to move either actor, I just want to be able to touch actor A , and by touching actor A it will destroy actor B. That's what I've been trying to do for 2 days now lol. Can anyone help?
Now I already set the actor up were I want them, I just want to touch one actor, making the other actor be destroy.
I have two actors, actor A and actor B, I set them across from each other. actor A is on the right side of the screen and actor B is on the left side. Now I dont want to move either actor, I just want to be able to touch actor A , and by touching actor A it will destroy actor B. That's what I've been trying to do for 2 days now lol. Can anyone help?
Now I already set the actor up were I want them, I just want to touch one actor, making the other actor be destroy.
Best Answers
-
jamie_c ImagineLabs.rocks Posts: 5,772Hi Jobei,
Try this:
1. Set up a boolean game attribute called destroyActorB - this should be false to start with.
2. Put a rule in actor B that says if destroyActorB is true destroy me.
3. Put a rule on actor A that says if I'm touched change destroyActorB to true.
That should do it.
Jamie -
jamie_c ImagineLabs.rocks Posts: 5,772I made a quick demo here you can download.
http://www.jamie-cross.net/tutorial-downloads/gamesalad/destroyme.zip
Jamie -
lanmind Posts: 29Put another rule in actor A that says:
If I'm touched AND destroyActorB is true spawn Actor B
Answers
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page