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 »simple script help.

Author Topic: simple script help. (16 messages, Page 1 of 1)
Moderators: Dennis

G TheFlea
Joined: Sep 19, 2008

CANADIAN


Posted: Nov 5, 2009 05:55 PM    Msg. 1 of 16       
hey guys im not new to HCE but i am pretty new to scripting. i dont actualy know if i need a script for this but how would i make my actor varients run to a certain point on the map as soon as they spawn. i know that whoever made "bloodgrunts" did it with a script and firing positions so can someone explain what i should do?


G TheFlea
Joined: Sep 19, 2008

CANADIAN


Posted: Nov 5, 2009 06:22 PM    Msg. 2 of 16       
ok then


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Nov 5, 2009 06:57 PM    Msg. 3 of 16       
They probably used command lists, which are the most distasteful way to cause AI to fight. Why?

1) It destroys any sense of intelligence that the AI may have had.
2) It just looks dull, with people following the same paths over and over.
3) It leaves no room for imaginative battles.

The best way to get AI to fight, is to put firing positions all over the battle area. Then, set the AI to "guarding at guard position" for its initial and return states, in all squads. Then, create a script for the two AI encounters (this is assuming you have two. If you have three, just add on a new line for every encounter to see the new encounter, and another bunch for the new encounter to see the old encounters)


(script continuous see
(ai_magically_see_encounters [AI ENCOUNTER 1] [AI ENCOUNTER 2])
(ai_magically_see_encounters [AI ENCOUNTER 2] [AI ENCOUNTER 1])
)


Replace [AI ENCOUNTER 1] and [AI ENCOUNTER 2] with your encounter names. The [ and ] are purely for aesthetics, and do NOT appear in the final script, UNLESS you use them in the encounter name.


G TheFlea
Joined: Sep 19, 2008

CANADIAN


Posted: Nov 5, 2009 07:02 PM    Msg. 4 of 16       
so then my spartans will see the covies all the way across the map. but will they move towards them?


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Nov 5, 2009 07:05 PM    Msg. 5 of 16       
If you were to set up firing positions near the covies, as well as set them to guarding at guard position, then I see no reason as to why they won't move.


G TheFlea
Joined: Sep 19, 2008

CANADIAN


Posted: Nov 5, 2009 07:13 PM    Msg. 6 of 16       
and then i can script it so that when that covie encounter is dead they will magically see another right?


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Nov 5, 2009 07:14 PM    Msg. 7 of 16       
I'm assuming you're making an AI mod, where the AI continuously respawn, so I made the script continuous, so that when they respawn, they'll see the AI.

Unless of course, you mean like there's another AI encounter, that you want the spartan encounter to see after the covie encounter is dead.


G TheFlea
Joined: Sep 19, 2008

CANADIAN


Posted: Nov 5, 2009 07:21 PM    Msg. 8 of 16       
Quote: --- Original message by: Gamma927

Unless of course, you mean like there's another AI encounter, that you want the spartan encounter to see after the covie encounter is dead.


exactly and its actualy a basic SP scenario.


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Nov 5, 2009 07:22 PM    Msg. 9 of 16       

(script startup battle
(ai_magically_see_encounters [AI ENCOUNTER 1] [AI ENCOUNTER 2])
(ai_magically_see_encounters [AI ENCOUNTER 2] [AI ENCOUNTER 1])
(sleep_until (= (ai_living_count [AI ENCOUNTER 2]) 0) 15)
(ai_magically_see_encounters [AI ENCOUNTER 1] [AI ENCOUNTER 3])
)


G TheFlea
Joined: Sep 19, 2008

CANADIAN


Posted: Nov 5, 2009 07:26 PM    Msg. 10 of 16       
ok i get everything but the 15...wat the hell is the 15 for....
why couldnt they have just used C++ or Java??!


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Nov 5, 2009 07:32 PM    Msg. 11 of 16       
The fifteen represents the number of ticks it takes between checking whether the condition is true or not. If you're fluent in Java, you should be able to understand this. Even though the commands are different, pseudocode for Java and C++ can mostly be translated into scripting.


G TheFlea
Joined: Sep 19, 2008

CANADIAN


Posted: Nov 5, 2009 07:43 PM    Msg. 12 of 16       
yea i know Java and C++ but i dont really recognize that...and in my defense this is actualy the first time ive done anything with halo script other than copy and pasting a script to make an AI enter a ghost.


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Nov 5, 2009 07:51 PM    Msg. 13 of 16       
Of course you don't recognize it. It's like learning a new language. I took Java as a course while doing scripting all of last year, and being fluent in one helps you succeed in the other.


G TheFlea
Joined: Sep 19, 2008

CANADIAN


Posted: Nov 5, 2009 07:59 PM    Msg. 14 of 16       
cooool.. my school only offers java in grade 11 and 12. they dont teach C++so i learned that on my own. where do you live that they teach you java in grade 10??


Gamma927
Joined: Jun 12, 2008

Steam: gamma927


Posted: Nov 5, 2009 08:06 PM    Msg. 15 of 16       
I took java in 9th grade. I'm taking AP Computer Science now.

Where? In California.


G TheFlea
Joined: Sep 19, 2008

CANADIAN


Posted: Nov 5, 2009 08:16 PM    Msg. 16 of 16       
w0w lucky. im in Ontario and they teach us meaningless crap like flash in grad 9 and then some other language called turing in grade 10..

 

 
Previous Older Thread    Next newer Thread







Time: Fri January 20, 2023 2:10 PM 141 ms.
A Halo Maps Website