Scripts
Posted: Sat Jun 23, 2007 6:58 pm
ok anyways...im making an AI mod...but i need the ai to spawn only when you walk through a trigger
So i made my trigger, Made my script compiled the script in Sapien (compiled fine) playef my map, but no AI came when i walked through the trigger
Heres my script
And my trigger is right here

so can anyone tell me what im doing wrong?
thanks
-Andrew_b
So i made my trigger, Made my script compiled the script in Sapien (compiled fine) playef my map, but no AI came when i walked through the trigger
Heres my script
Code: Select all
(global short number 0)
; this is still here so it could be adapted for multiplayer...
(script startup spawn_ai
; Time to check if a player is inside our trigger "spawn_ai"
(if (= (volume_test_object spawn_ai (list_get (players) number)) true)
(begin
; Woot woot - they're inside the volume... let's spawn one AI from our
; encounter "grunts"
(ai true)
(ai_set_respawn Humans true) ; assuming we want to
(ai_place Humans)
(ai_set_respawn Humans2 true) ; assuming we want to
(ai_place Humans2)
(ai_set_respawn Covenant true) ; assuming we want to
(ai_place Covenant)
(ai_set_respawn Covenant2 true) ; assuming we want to
(ai_place Covenant2)
(ai_place NR_Humans)
(ai_place NR_Humans2)
(ai_place NR_Covenant)
(ai_place NR_Covenant2)
(ai_place follow)
)
)
)

so can anyone tell me what im doing wrong?
thanks
-Andrew_b