Game Development Community

Object doesnt reverse on Path

by Vlad I · in Torque Game Builder · 11/04/2011 (2:32 am) · 24 replies

I have an object mounted on a path wich doesnt reverse upon reaching a node why?
Upon reaching node 2 it gets stuck and sort of twitches. No errors in the console.
All I'm trying is to make my scorpion move from left to right on a path with random speed upon reaching a node.

function Scorpion05::onLevelLoaded(%this, %scenegraph)
{
P4.attachObject(Sc5, 5, 1, 0, 2, "reverse", -1, false);
}

function ScPath04::onReachNode(%this, %object, %node)
{
if(%node $= 2)
{
P4.setSpeed(Sc5, getRandom(1, 10));
}
}


Also I have another question. When you mount an object on a path you can set Rotation Offeset in Pathing in TGB editor.
How can I do it from the script?
smth. setRotationOffeset(90); ?
Page«First 1 2 Next»
#21
11/06/2011 (9:22 am)
Hey Patrick , I noticed a funny thing every time I execute that file you gave me my antivirus says it detected pdm.keylogger
#22
11/06/2011 (12:34 pm)
Hey Vlad, I ran a scan on my system and didn't find anything. I saw on Google that pmd.keylogger is a common false positive with Kaspersky software; is that what you're using?
#23
11/06/2011 (10:46 pm)
Yes you are right! I think Kaspersky is over reacting :) smth has to do with kernel memory.
#24
11/07/2011 (5:41 am)
Raising my heart rate Vlad!!! Well, I needed to run a full scan anyways I guess. :)
Page«First 1 2 Next»