Spawning an actor in front of an actor (by tapping a different actor)
mguniverse
Member Posts: 12
This is a pretty complicated problem so read carefully.
Basically there is an object in the middle of the screen (let's call him Robot). I am trying to make it so when I click on an actor (let's call it button) it spawns an actor (called Box) in front of robot. Here is how I am doing this:
I have an integer involved called triggerBox. When touch is pressed on the button, it changes triggerBox to 1 and when it is released it changes it back to 0. Robot has a rule that when triggerBox = 1 it spawns the actor Box in front of actor relative to actor. I don't understand what I am doing wrong. I have a visible text box displaying the triggerBox integer and that is working correctly however when triggerBox is = 1 it does not spawn the Box in front of Robot.
Any thoughts?
Basically there is an object in the middle of the screen (let's call him Robot). I am trying to make it so when I click on an actor (let's call it button) it spawns an actor (called Box) in front of robot. Here is how I am doing this:
I have an integer involved called triggerBox. When touch is pressed on the button, it changes triggerBox to 1 and when it is released it changes it back to 0. Robot has a rule that when triggerBox = 1 it spawns the actor Box in front of actor relative to actor. I don't understand what I am doing wrong. I have a visible text box displaying the triggerBox integer and that is working correctly however when triggerBox is = 1 it does not spawn the Box in front of Robot.
Any thoughts?
Comments
Have you tested by doing the display text triggerBox to see if it's changing to the correct number?
Darren.
Also have you have never really answered the question of does the box destroy when the button is released or does it stay in front of the robot? I think that would be important for anyone to know to be able to offer you advice.