Jump to content
Sign in to follow this  
roguetrooper

destroy-waypoint on a dynamically created unit

Recommended Posts

I want to set a destroy-waypoint on a dynamically (createvehicle) created unit for the player's group (MP).

The spawned unit has the name "target". The target is a stationary soldier and does not move. Everything works fine so far with

_grp addwaypoint [position target,0];
[_grp,1] setwaypointtype "DESTROY";
[_grp,1] setWaypointDescription "DESTROY";

These are the problems:

1. On the HUD you only see "Move" (Bewegen) instead of "Destroy". I want it to be displayed as "Destroy".

2. The waypoint disappears, when your group is near the target. But I want it to disappear ONLY, when the target is dead, no matter how near the player's group is.

Any ideas? Thanks in advance!

Share this post


Link to post
Share on other sites

This will keep the Destroy Target visible and it will move with the target.

while {alive target} do
{
_wp = _grp addwaypoint [position target,0];
_wp setwaypointtype "DESTROY";
_wp setWaypointDescription "DESTROY TARGET";
_grp setCurrentWaypoint _wp;
sleep 2;
deletewaypoint _wp;
};


hint "The target has been killed!";
deleteWaypoint _wp;

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×