Page 1 of 1

example of my vehicle script

Posted: July 13th, 2014, 1:18 pm
by privateparts
Hi guys first time ive posted on here so here goes ive managed to get moving vehicles running in my map but when i try to link a trigger to the vehicle so that it kills you when hit in mp it works the first time, but then on the second time it says link already enabled and fails to work can someone tell me what i need to do to get the trigger hurt to work every time when the vehicle runs please? here is a copy of the vehicle script in question

main()
{
thread veh5();
}

veh5()
{
while(1)
{
veh5 = getent("veh5","targetname");


desti_veh5 = getent("veh_destination5", "targetname");


veh5.dest = desti_veh5.origin ;
wait 10;
veh5.start = veh5.origin;
veh5 playloopsound ("truck_passing");
trig = getEnt("trigger_hurt", "targetname");
veh5 = getEnt("veh5", "targetname");

trig enableLinkTo();
trig linkTo(veh5);

veh5 moveto(veh5.dest, 24, 0.1, 0.1);
veh5 waittill("movedone");
veh5 StopLoopSound ("truck_passing");
veh5.origin = veh5.start;
veh5 hide();
wait 10;
veh5 show();
}
}