The idea is to use this for a repairable vehicle.
The vehicle, in this case a tank, starts off in it's
destroyed state.
The allies can repair it and it drives off following
the waypoint path.
This I have mapped and scripted and it works.
Now I want to expand on this so the tank can be blown up
whilst in transit.
Well I have a partial soultion...over each waypoint I placed
a vehicle_trigger.When the tank hits this the trigger fires.
Now I have a variable called level.waypoint that increments when
each trigger is hit.
Code: Select all
tankdrive_trigger1:
$waypoint1_trigger waittill trigger
level.waypoint++
print "Waypoint 1 trigger fired"
print (levle.waypoint)
end
tankdrive_trigger2:
$waypoint2_trigger waittill trigger
level.waypoint++
print "Waypoint 2 trigger fired"
end
tankdrive_trigger3:
$waypoint3_trigger waittill trigger
level.waypoint++
print "Waypoint 3 trigger fired"
end
when the tank is destroyed it stops the destroyed model is spawned and
can be repaired.Once repaired it carries on it's journey to the
next waypoint.
This is the bit that's not working...the tank doesn't move to the
next waypoint.
Is there a way to tell the tank to drive to $wapX
with X being equal to level.waypoint + 1??
E.g $wap3
Code: Select all
tank_drive:
level.waypoint++
$tank drive $("wap" + (level.waypoint))
thread tank_death
$tank waittill drive
goto tank_drive
end