Making an actor touchable then not touchable.
Hi guys,
got another problem! I have an actor I can drag on the screen to kill an enemy, but after dropping it on the screen I dont want it to be touchable (touch-pressed). I want it to stay where it has be placed.
Cant figure this trick out? Any ideas?
Thanks.
got another problem! I have an actor I can drag on the screen to kill an enemy, but after dropping it on the screen I dont want it to be touchable (touch-pressed). I want it to stay where it has be placed.
Cant figure this trick out? Any ideas?
Thanks.
Comments
That should do it.
My suggestion would be to make a boolean attribute call self.Can move and set it to true.
Then create a rule which says when touch is pressed and attribute self.can move is true then move to where ever.
Then create a rule where if touch is released then
change self.can move to false.
Thats should work.
All the best
JonApp
But now I can not move around the scene, I have it so when you select and item to drag on the scene it controls to camera so you can place it where you want. Do you know what else I would need to add to fix this?
Cheers.
This actor (like others I want to create) are the users options to place on the scene to fight certain enemies, so they can place where they like and then they cannot move (like command and conquer).
Moving the item now works good, I can move and place anywhere on scene, then it cannot be moved, but now user cannot move around the scene.
Hope that helps!
Thanks.
Try having the attribute change back to true lets say 0.3 seconds after the actor is released, that way the behaviour should technically restarts and you can pick the actor up and move it again.
Just the cam that controls the screen movement around the scene now does not work.
The canera control when placed in the rule can move is true will work so you can move your actor to the edge of the screen and the camera will start to move. You can change the camera tracking area if you want it closer to the actor when the camera starts to move. Once placed it no longed has camera control so you might need to activate the camera control so they player can freely move around. Hopefully that made sense and is what you are looking for because there are two different topics happening at once.
All the best
JonApp
May have to submit to support for some extra help on this one.