Post: Help with having a object following a path over and over again
08-13-2015, 01:50 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); I want to have a object that works like a elevator (sharks zombieland for example) but instead of having just the start and end points and going back and forward
i wanna have it so it goes to like for example, point 1, point 2, point 3, point 4 then connect back to point 1 and go around all the points again in a loop basically.

This is the script from sharks zombieland for the elevator function
is there anyway i can modifiy this so that it works the way i mentioned above?

    CreateElevator(start, end, Angle, time, waittime)
{
Angles = Angle;

center = spawn("script_model", start);
elevator = spawnEntity("script_model", "veh_t6_civ_truck_radiant_white_mp(example model)", start, Angles);
elevator EnableLinkTo();
elevator LinkTo(center);

level thread Elevator_Think(center, start, end, time, waittime);
}


Elevator_Think(elevator, start, end, time, waittime)
{
level endon("game_ended");

wait waittime;
for(;Winky Winky
{
if (elevator.origin == start)
{
elevator MoveTo(end, time);
wait time;
wait waittime;
}
if (elevator.origin == end)
{
elevator MoveTo(start, time);
wait time;
wait waittime;
}
wait 0.01;
}
}


it would be good if i could set it up like this when creating a map edit

Point 1 Point 2 Point 3 Rotation Speed/Wait Time
CreateElevator((1, 2, 3), (2, 3, 4), (3, 4, 5), ( 0, 90, 0), 20, 10);

if someone could help me with this i would greatly appreciate it Smile
(adsbygoogle = window.adsbygoogle || []).push({});

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo