example of my vehicle script

Have questions about CoD4 mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

Post Reply
privateparts
CJ Wannabe
CJ Wannabe
Posts: 4
Joined: June 26th, 2014, 4:18 pm

example of my vehicle script

Post by privateparts » July 13th, 2014, 1:18 pm

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();
}
}

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests