Quote: --- Original message by: Gamma927
If you wish to attach a nav point to an object, (a biped or vehicle, for instance), you'd need to use:
(activate_team_nav_point_object "navpoint type" "team" "object" "vertical offset")
For "navpoint type", replace it with the type of navpoint you want. I don't really remember all of them; in fact, the only one you probably need is "default". That's the default blue arrow used throughout the campaign.
For "team", this is the team that sees the nav point. Obviously, you want the player to see the nav point, and thus, you use "player". If this is a multiplayer map, teams are done differently, and the player team is blue team (afaik, iirc). I'll check tomorrow.
The "object" is the object you wish to attach the nav point to. Just substitute it with the name of the object you want (this can be specified in the properties pane when you select the object in hierarchy view).
The "vertical offset" is how high above the object you want the nav point to appear. If you're all out of ideas, 0.6 is a good number.
So, an example of this, using object1 as the name of the object, would be:
(activate_team_nav_point_object default player object1 0.6)
This activates the nav point. Whenever you wish to deactivate it, you'd use something similar, basically:
(deactivate_team_nav_point_object "team" "object")
"Team" and "object" are the same ones you used for the activate command.
If you wish to attach this to a flag rather than an object (flags are placed in hierarchy view; mission > game data > flags), then use
(activate_team_nav_point_flag "navpoint type" "team" "flag" "vertical offset")
and deactivating it would be: (deactivate_team_nav_point_flag "team" "flag")
Now, you probably want to make these nav points appear once you go through a trigger volume, or when something happens. Basically, you'd use a "conditional" phrase before the activate / deactivate commands. A conditional phrase is basically a command that checks whether a condition is true or false. Slightly confusing, but for now, we won't go too far into it.
Let's say you want to use a trigger volume to activate the nav point. Here, the trigger volume would be the conditional, because that's what checks whether something is true or not (whether the player is in the trigger volume)
An example of this script would be:
(sleep_until (volume_test_objects triggervolume (players)) 15)
(activate_team_nav_point_object default player object1 0.6)
Now, for attaching to a specific AI, you'd use the object command. However, AI aren't objects, so you'll need to cast them. Example:
(activate_team_nav_point_object default player (unit (list_get (ai_actors "AI ENCOUNTER") 0)) 0.6)
Also, the nav point bitmap is probably referenced in the globals.globals somewhere, or in the default.hud_globals. You'll find it.