Help with teleporting actor ,etc.
NinjaCats
Member Posts: 3
Hi, i just started trying out game salad and began brewing up ideas.
1) im trying to figure out how to teleport a actor when clicking or touching the screen in the area, i would like him to go (kind of like nightcrawler) How exactly would i go about it? I tried using a rule to delete him then appear at the spot of the click (or touch) but can't seem to figure it out. also having a problem with him going off screen and cant seem to keep him in screen. any help would be greatly appreciate.
2) also trying to figure out how to make him swing a sword then go back to standing animation.
Thank you
NinjaCats
Comments
Hello @NinjaCats and welcome to the GameSalad Forums.
To "teleport" an actor is relatively simple: just add two Change Attribute behaviours, one for the new X coordinate and the other for the Y.
For your player to swing a sword, there are two ways I can think of to do that - probably the easiest is to have animation frames. If the sword swing is produced when the user presses a button perhaps, you could use something likes the following in the button:
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Thank you for the response and info
Could you explain a little deeper on the teleport? what kind of rule would i use or where would i place the changed behaviors at to control him? like teleport wherever i click.
thank you
Hi again, if you wanted to teleport the actor wherever you clicked, then one way to do this is to put the following Rules into your background actor:
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Thank you so much for your help, it works now! just one last question if i wanted a timer (like he can only teleport ever 10 secs) how would i go about that?
OK, try the following: make a boolean, let's call it Teleport.
Now amend that Rule in the background actor to:
If it's not working as expected, change that second Rule to this alternative:
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps