Ok from the top …
Excuse me if I go over the same ground as you may already know, but I’m not sure what state your map/script is in.
Btw, I use the word “AIentity” to mean a starting point in the AI script and a “function” as an action defined in a AIentity like spawn, trigger, death.
First you need to set a <map name>.AI file which controls the SP game and objectives. Usually the first section of the AI script is the “player” AIentity which controls the player in game and all other functions associated with the player in game.
Usually at the top of the script you setup how many objectives you have with the “objectivesneeded” script command. This is always done underneath the “player” AIentity.
Then you setup all the trigger functions below like for example “obj1_completed”, “obj2_completed” etc. These functions control the script actions to take once the requirments have been met in the map.
Then in your map you need to setup the ai_trigger’s which have the following keys. “ainame” which points to the AIentity name eg. “player” and a “target” field which points to the above function “obj1_completed”. This is done alot in RTCW where key fields are not labeled correctly and are used differently when connected to scripts. Target is usually used for connecting entities within a map file not entities to scripts.
Finally in your “obj1_completed” function you use the script command “objectivemet” followed by the objective completed. This is NOT an accumlator field but points to the exact objective completed. Plus once the objective is set it cannot be unset.
Hope that helps
Sock
3D Brush Monkey
EDIT: Damn typos :razz:
<font size=-1>[ This Message was edited by: sock on 2002-06-24 19:18 ]</font>