Scripts

Discuss stuff related to HaloCE (for modding, go to the HEK General forum).
Post Reply
User avatar
Andrew_b




Socialist

Posts: 4188
Joined: Sat Feb 24, 2007 4:52 pm
Contact:

Scripts

Post by Andrew_b »

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

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)

		) 

	) 

)
And my trigger is right here
Image

so can anyone tell me what im doing wrong?

thanks
-Andrew_b
User avatar
wanksta
Readers Club




Wordewatician 500

Posts: 617
Joined: Mon Jun 11, 2007 3:04 pm
Location: Owning Freedom451 Constantly over LAN. Kills:999999999 Owns:943234 Pwns:749455 Killtaculars:5667

Post by wanksta »

let me say something... did you just copy someones elses script or did you write this... cause that script is weird.

do you just want too spawn a encounter when you walk into the trigger?
i wrote you a better script here

(script startup spawning_script
(sleep_until
(volume_test_objects
spawn_ai
(players))15)
(ai_place Covenant2)
(ai_place NR_Humans)
(ai_place NR_Humans2)
(ai_place NR_Covenant)
(ai_place NR_Covenant2)
(ai_place follow))

try and compile that one and see if it works.
Sig may not be animated.
Lol you got me in like 3 minutes!
Oh wait... I'm banned.... well not funny anymore...
User avatar
Andrew_b




Socialist

Posts: 4188
Joined: Sat Feb 24, 2007 4:52 pm
Contact:

Post by Andrew_b »

yeah thanks for responding...a guy wrote me the basics...but he wrote it wrong...and malolo helped me
User avatar
Andrew_b




Socialist

Posts: 4188
Joined: Sat Feb 24, 2007 4:52 pm
Contact:

Post by Andrew_b »

sorry for the double post/bump thing...but wanksta, do you know the script to make ai only spawn on race??? (i didnt want to make another topic, so i double posted)
User avatar
wanksta
Readers Club




Wordewatician 500

Posts: 617
Joined: Mon Jun 11, 2007 3:04 pm
Location: Owning Freedom451 Constantly over LAN. Kills:999999999 Owns:943234 Pwns:749455 Killtaculars:5667

Post by wanksta »

no i dont think thats possible.
Sig may not be animated.
Lol you got me in like 3 minutes!
Oh wait... I'm banned.... well not funny anymore...
Post Reply