A Community discussion forum for Halo Custom Edition, Halo 2 Vista, Portal and Halo Machinima

Home  Search Register  Login Member ListRecent Posts
  
 
»Forums Index »Halo Custom Edition (Bungie/Gearbox) »Halo CE Technical / Map Design »How to make ai spawn in Single player maps

Author Topic: How to make ai spawn in Single player maps (32 messages, Page 1 of 1)
Moderators: Dennis

Killeryoshi
Joined: Jan 22, 2009

Captain Yoshi on duty!


Posted: Apr 6, 2009 11:05 PM    Msg. 1 of 32       
Hey can anyone tell me how to like make a single player map, I see an option in guerilla that is under map types I think it says single multiplayer UI is that how I make a multiplayer map a single player map? And how do I like make ai spawn under certain conditions, like ai spawn when this location is reached or ai spawn here after this encounter or ai is killed?


yukonmuffin
Joined: May 10, 2007

Breakn' Stuff to look tough.


Posted: Apr 6, 2009 11:42 PM    Msg. 2 of 32       
the option in guerilla is under skys, hit chose solo. There is a tutorial on here somewere, look up " Polor bears SP Map Tutorial". It'll explain how easy AI's are to place. I recommend learning how to script them in, but telling sapien to spawn them is easyer.


Killeryoshi
Joined: Jan 22, 2009

Captain Yoshi on duty!


Posted: Apr 7, 2009 06:19 PM    Msg. 3 of 32       
Yes when I build the script can i like copy it from the tutorial and it still work? And can It be a .txt file?


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Apr 7, 2009 06:29 PM    Msg. 4 of 32       
Scripts must be .hsc files, else they will not be detected by the compiler. Also, the command to place AI when the player is inside a trigger volume is:

(script startup tvol
(sleep_until (volume_test_objects tvol (players)) 15)
(ai_place ai)
)


The AI encounter is called ai, and the trigger volume is called tvol.


Killeryoshi
Joined: Jan 22, 2009

Captain Yoshi on duty!


Posted: Apr 7, 2009 09:53 PM    Msg. 5 of 32       
Oh because I can't do .hsc files


sierra117
Joined: Jan 10, 2008

If sex is good exercise, why are there fat sluts?


Posted: Apr 7, 2009 10:02 PM    Msg. 6 of 32       
then open the file in notepad. And save it as a new file. But this time change it froma .txt file to a "all files" (its a little drag box where it says change file type) and after thats been changed. put a .hsc at the end of your file


Killeryoshi
Joined: Jan 22, 2009

Captain Yoshi on duty!


Posted: Apr 8, 2009 06:59 PM    Msg. 7 of 32       
I can do txt doc not note pad but that could work.


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Apr 8, 2009 07:01 PM    Msg. 8 of 32       
Use notepad to create scripts. When you want to save it, go to Save As, change ".txt files" to "all files", and in the name, add a .hsc after it. So fill it in with script.hsc, or something like that.


Killeryoshi
Joined: Jan 22, 2009

Captain Yoshi on duty!


Posted: Apr 9, 2009 05:18 PM    Msg. 9 of 32       
I right clicked on my mouse and looked under new and it wasn't there.


yukonmuffin
Joined: May 10, 2007

Breakn' Stuff to look tough.


Posted: Apr 10, 2009 01:03 PM    Msg. 10 of 32       
notepad wasn't there? odd, but anything will work i guess. just click save as and chose save as type "all files", make sure it's ANSI encoded (that should be the default so don't worry about it) and make sure you save it as something like "my_script.hsc".


Killeryoshi
Joined: Jan 22, 2009

Captain Yoshi on duty!


Posted: Apr 10, 2009 04:12 PM    Msg. 11 of 32       
I have windows 7.


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Apr 10, 2009 06:49 PM    Msg. 12 of 32       
Why do you need to right click and find a new? Steps:

1) Open notepad.
2) Type stuff
3) Go to File > Save As
4) Follow the picture, select all types, and save it as script.hsc in your scripts folder


BTW, this is Windows 7 also.


Killeryoshi
Joined: Jan 22, 2009

Captain Yoshi on duty!


Posted: May 20, 2009 05:22 PM    Msg. 13 of 32       
Quote: --- Original message by: Gamma927
Scripts must be .hsc files, else they will not be detected by the compiler. Also, the command to place AI when the player is inside a trigger volume is:

(script startup tvol
(sleep_until (volume_test_objects tvol (players)) 15)
(ai_place ai)
)


The AI encounter is called ai, and the trigger volume is called tvol.

players? what do I put under the players space?


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: May 20, 2009 06:20 PM    Msg. 14 of 32       
It's filled out for you.... Leave it as players. The only thing you should have to replace is the name of the trigger volume, and the AI encounter.


Killeryoshi
Joined: Jan 22, 2009

Captain Yoshi on duty!


Posted: May 20, 2009 08:17 PM    Msg. 15 of 32       
Quote: tvol

are those the right letters to enter?
(script startup tvol(sleep_until (volume_test_objects tvol (players)) 15)(ai_place elite minor plasma rifle

Like that? and do I need to include the .actor variant?
Edited by Killeryoshi on May 20, 2009 at 08:23 PM


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: May 20, 2009 08:27 PM    Msg. 16 of 32       
What...

Let me re-iterate. Instead of filling it in for you, I'm going to give you the blanks to fill in.

Here's the key:
-[AI] - Name of an AI encounter.
-[TVOL] - Name of a trigger volume.
-[NAME] - Name of script. Put anything you want.


(script startup [NAME]
(sleep_until (volume_test_objects [TVOL] (players)) 15)
(ai_place [AI])
)


Edit: Hey, I like this new way of expressing blanks. I'm using it from now on :D
Edited by Gamma927 on May 20, 2009 at 08:27 PM


Killeryoshi
Joined: Jan 22, 2009

Captain Yoshi on duty!


Posted: May 21, 2009 06:31 PM    Msg. 17 of 32       
Do I include the space too?
Dude what the heck it didn't work look
Quote: this is not a valid trigger_volume name: [spawn] (players)) 15)(ai_place [test]))---<

Edited by Killeryoshi on May 21, 2009 at 07:20 PM


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: May 21, 2009 07:24 PM    Msg. 18 of 32       
Unless your trigger volume is called [spawn], it won't work, BECAUSE you didn't take off the [ and the ]. You should put spawn, and (ai_place test)


Killeryoshi
Joined: Jan 22, 2009

Captain Yoshi on duty!


Posted: May 22, 2009 08:50 PM    Msg. 19 of 32       
nvm it worked but now I am having trouble with a sv_say command look (script startup sv say
(sv_say "Hello World!!!") ;; display message))


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: May 22, 2009 08:51 PM    Msg. 20 of 32       
Doesn't work in SP maps, because it requests that the server print out the text.


Killeryoshi
Joined: Jan 22, 2009

Captain Yoshi on duty!


Posted: May 22, 2009 08:54 PM    Msg. 21 of 32       
I know I changed it to multiplayer
The map is Christmas_yoyorast_island_final
Edited by Killeryoshi on May 22, 2009 at 08:55 PM


Polamee
Joined: Feb 25, 2008

MP2SPMT's founder


Posted: May 22, 2009 09:13 PM    Msg. 22 of 32       
Then your trigger volume script won't work anymore.


Killeryoshi
Joined: Jan 22, 2009

Captain Yoshi on duty!


Posted: May 22, 2009 09:38 PM    Msg. 23 of 32       
What? Why? it was originally a multiplayer map dude and I want it to be sv_say
Edited by Killeryoshi on May 22, 2009 at 09:39 PM


Polamee
Joined: Feb 25, 2008

MP2SPMT's founder


Posted: May 23, 2009 05:34 AM    Msg. 24 of 32       
Quote: --- Original message by: Killeryoshi

What? Why? it was originally a multiplayer map dude and I want it to be sv_say
Edited by Killeryoshi on May 22, 2009 at 09:39 PM


Trigger volume scripts don't work in MP if the object referred to is "players".

Instead (credit to Gamma) you should create a variable which is set to 0 and adds one to itself every script cycle, and resets itself to 0 once it reaches 15. This will loop through the player list (0-15). Then, you can refer to them in a trigger volume script using:

(list_get (players) [Insert Variable name] )

As opposed to (players).

Of course, you could always create 16 separate scripts for each individual player list, but the above works best.

Script (again credit to Gamma and KS):

(global short x 0)

(script continuous yay
(if
(volume_test_object tvol (list_get (players) x))
[INSERT STUFF HERE]
)
)

(script continuous increase_reset
(set x (+ x 1))
(if
(> x 15)
(set x 0) ))


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: May 23, 2009 10:27 AM    Msg. 25 of 32       
(global short x 0)

(script continuous increase_reset
(set x (+ x 1))
(if
(> x 15)
(set x 0)
)
)

(script continuous announcement
(if
(volume_test_object tvol (list_get (players) x))
(begin
(sv_say "HAI GUIZ")
)
)
)



Killeryoshi
Joined: Jan 22, 2009

Captain Yoshi on duty!


Posted: May 23, 2009 04:25 PM    Msg. 26 of 32       
the scripts name is sv_say where does that go? And also I do use the script part which is under ai for a script like this right?


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: May 23, 2009 04:32 PM    Msg. 27 of 32       
*sigh*

Just copy down the script I made, and use it. The trigger volume's name is tvol.

Here's a comprehensive breakdown of the script (because I'm bored)

Creates a variable. Makes the variable loop through 0 - 15 faster than you can blink. So any script that references x, will essentially run it 16 times, with 0 replacing x for the first, 1 for the second, and so forth.

Whenever a player enters the trigger volume, the server will say: HAI GUIZ. If you can't find where in the script to change that, you officially need to get glasses (or a higher prescription if you have them). All you have to do is change HAI GUIZ to whatever you want the server to say.


Polamee
Joined: Feb 25, 2008

MP2SPMT's founder


Posted: May 24, 2009 03:27 AM    Msg. 28 of 32       
Quote: --- Original message by: Gamma927
*sigh*

Just copy down the script I made, and use it. The trigger volume's name is tvol.

Here's a comprehensive breakdown of the script (because I'm bored)

Creates a variable. Makes the variable loop through 0 - 15 faster than you can blink. So any script that references x, will essentially run it 16 times, with 0 replacing x for the first, 1 for the second, and so forth.

Whenever a player enters the trigger volume, the server will say: HAI GUIZ. If you can't find where in the script to change that, you officially need to get glasses (or a higher prescription if you have them). All you have to do is change HAI GUIZ to whatever you want the server to say.


I explained the script above.


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: May 24, 2009 10:30 AM    Msg. 29 of 32       
I believe that you posted BEFORE I posted my script. My script includes the sv_say command.


Killeryoshi
Joined: Jan 22, 2009

Captain Yoshi on duty!


Posted: May 24, 2009 07:27 PM    Msg. 30 of 32       
Oh yes guys I have another question can I like put multiple scripts in one notepad doc or do I have to make seperate scripts in a doc everytime I want it to like make an ai spawn?
Edited by Killeryoshi on May 24, 2009 at 07:27 PM


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: May 24, 2009 08:22 PM    Msg. 31 of 32       
You can put multiple scripts in one .hsc file.


Killeryoshi
Joined: Jan 22, 2009

Captain Yoshi on duty!


Posted: May 28, 2009 05:31 PM    Msg. 32 of 32       
Okay cool thanks for telling me that .

 

 
Previous Older Thread    Next newer Thread







Time: Sat January 21, 2023 12:39 AM 110 ms.
A Halo Maps Website