Can I make my character set it´s orientation to a enemy empty making a teleport effect
is there some script for this
if so can someone tell me how to make cube assign it´s orientation to empty
any help would be apriciated
Can I make my character set it´s orientation to a enemy empty making a teleport effect
is there some script for this
if so can someone tell me how to make cube assign it´s orientation to empty
any help would be apriciated
Orientation = rotation. If you want a teleport effect, you want position (location).
Put this on the empty:
import GameLogic as g
cont = g.getCurrentController()
own = cont.getOwner()
g.emptyLocation = own.getPosition()
Fit this into the character:
import GameLogic as g
cont = g.getCurrentController()
own = cont.getOwner()
if teleport.isPositive():
g.setPosition(g.emptyLocation)
In the second script, “teleport” would be whatever sensor that activates the warp.
Well, im a python noob, so perhaps you can explain a little more for my sake, or just take a look at this .blend that I couldn’t get to work, and point out to me what I did wrong http://www.fileden.com/files/17915/Python.blend
Well, you have to declare “teleport”. The script won’t automatically connect a sensor to a name. You have to force it by using
teleport = cont.getSensor("teleport")