UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Loop vehicle?

broken avatar :(
Created 7 years ago
by Doodles_Inc
0 Members and 1 Guest are viewing this topic.
1,964 views
broken avatar :(
×
broken avatar :(
Location: br
Date Registered: 20 April 2016
Last active: 2 years ago
Posts
145
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
Personal Quote
if I surprised you, you had underestimated me
Signature
if I surprised you, it was because you underestimated me
×
Doodles_Inc's Groups
Doodles_Inc's Contact & Social LinksdoodlescriminoserDoodles_IncDoodlesInc
So, I need to make so when my vehicle reaches it's final node, he goes backwards till the start node and then goes to the final node in a loop, but, I don't really know how to code it, someone has any ideas?
I made a script, but it doesn't work, if you want to check it... https://pastebin.com/jLxivaUp
Thanks.
Last Edit: September 10, 2017, 02:38:02 am by Doodles_Inc
This topic contains a post which is marked as the Best Answer. Click here to view it.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 28 June 2015
Last active: 4 years ago
Posts
72
Respect
Forum Rank
Rotting Walker
Primary Group
Member
×
Wolfilms's Groups
Wolfilms's Contact & Social Links
I'm guessing the train moves to the last node, but then never goes back the other way? Meaning you can get it moving forward, but it won't go backwards?
broken avatar :(
×
broken avatar :(
Location: br
Date Registered: 20 April 2016
Last active: 2 years ago
Posts
145
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
Personal Quote
if I surprised you, you had underestimated me
×
Doodles_Inc's Groups
Doodles_Inc's Contact & Social LinksdoodlescriminoserDoodles_IncDoodlesInc
I'm guessing the train moves to the last node, but then never goes back the other way? Meaning you can get it moving forward, but it won't go backwards?
Exactly
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 28 June 2015
Last active: 4 years ago
Posts
72
Respect
Forum Rank
Rotting Walker
Primary Group
Member
×
Wolfilms's Groups
Wolfilms's Contact & Social Links
My best guess is you can't have negative speed (so -25, and -4 aren't possible... I think). I can't test anything now, but you might need to get another path that goes the the opposite way since the original path only goes forward (meaning the nodes are connected the the one in front of it).
Marked as best answer by Doodles_Inc 7 years ago
broken avatar :(
×
broken avatar :(
Location: br
Date Registered: 20 April 2016
Last active: 2 years ago
Posts
145
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
Personal Quote
if I surprised you, you had underestimated me
×
Doodles_Inc's Groups
Doodles_Inc's Contact & Social LinksdoodlescriminoserDoodles_IncDoodlesInc
So yeah, after a lot of research and the Wolfilms repeated nodes method, I had managed to make it work, kind of, but, a guy named ZoekMeMaar, sad that, I can set a new path for the vehicle whenever I want like this:
    n_path_start = GetVehicleNode( "new_node", "targetname" );
    level.vh_train AttachPath( n_path_start );
    level.vh_train StartPath();
So yeah, if I mix this and the Wolfilms method, problem solved!
Last Edit: September 11, 2017, 08:10:23 pm by Doodles_Inc

 
Loading ...