
TLS_FlyingDog
Joined: Mar 2, 2007
|
Posted: Apr 19, 2009 12:58 AM
Msg. 1 of 7
Would someone please help me understand how the nav script works and how to write one. I am just starting to learn scripting so please bare with me. How would you attache it to an AI or game flag.
also i have added trigger volumes on my map and it seems you need to hit them in order. is this normal?
Thanks FlyingDog
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Apr 19, 2009 01:04 AM
Msg. 2 of 7
Quote: --- Original message by: TLS_FlyingDog Would someone please help me understand how the nav script works and how to write one. I am just starting to learn scripting so please bare with me. How would you attache it to an AI or game flag.
also i have added trigger volumes on my map and it seems you need to hit them in order. is this normal?
Thanks FlyingDog @ Trigger volumes. Yes, it's normal, because that's the purpose of a trigger volume. @ Nav points. The command is: (activate_team_nav_point_flag "default" "player" [name of flag] 0.6)
I've given you the recommended settings. Replace [name of flag] with the name of the game flag. I have to go soon, so I can't explain attaching to an AI. I'll post tomorrow, if someone doesn't beat me to it.
|
|
|

Headhunter09
Joined: May 6, 2008
This is the truth.
|
Posted: Apr 19, 2009 09:07 AM
Msg. 3 of 7
I think this is the command: (activate_nav_point_object "default" "player" [object] 0.6)
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Apr 19, 2009 10:12 AM
Msg. 4 of 7
Quote: --- Original message by: Headhunter09I think this is the command: (activate_team_nav_point_object "default" "player" [object] 0.6)
FTFY Now, to attach to AI, you must create a biped, and attach it to the AI encounter, through the (ai_attach command. Once it's attached, refer to it using the script above.
|
|
|

TLS_FlyingDog
Joined: Mar 2, 2007
|
Posted: Apr 19, 2009 02:21 PM
Msg. 5 of 7
Thank you gamma927 that worked great. Nav Point poped up as soon as the level started. what i did was change it to come up on a trigger and it worked but i'm ubable to deactivate it now. here is what i have.
nav1 is the trigger to activate the nav point at flag test test is the nav point flag name denav1 is the trigger to deactive the nav point flag at flag test
(script startup basicsript (sleep_until (volume_test_objects nav1 (players))15) (activate_team_nav_point_flag "default" "player" test 0.6) (sleep_until (volume_test_objects denav1 (players))15) (deactivate_team_nav_point_flag "default" "player" test 0.6) )
here is the debug: 04.19.09 13:15:30 [nav line 5] this is not a valid cutscene_flag name: player" test 0.6) 04.19.09 13:15:30 recompiling scripts after scenarios were merged. 04.19.09 13:15:30 [nav line 1] this left parenthesis is unmatched.: (script startup basicsript
or is there an easier way? any help would be great.
Thank you FlyingDog Edited by TLS_FlyingDog on Apr 19, 2009 at 02:24 PM
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Apr 19, 2009 03:01 PM
Msg. 6 of 7
Oh, I'm sorry. I forgot to tell you how to deactivate it. You have the deactivate command correct. All you have to do, is delete the "default" and the 0.6. So it should look like: (script startup basicsript (sleep_until (volume_test_objects nav1 (players))15) (activate_team_nav_point_flag "default" "player" test 0.6) (sleep_until (volume_test_objects denav1 (players))15) (deactivate_team_nav_point_flag "player" test) )
|
|
|

TLS_FlyingDog
Joined: Mar 2, 2007
|
Posted: Apr 19, 2009 03:06 PM
Msg. 7 of 7
Thank you,
You are a great help
|
|
|