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 »[Tutorial] Creating your own air support

Author Topic: [Tutorial] Creating your own air support (7 messages, Page 1 of 1)
Moderators: Dennis

The Cereal Killer
Joined: Mar 18, 2011

Scripts, AI, cutscenes, ui_widgets, animation.


Posted: Apr 3, 2011 07:40 PM    Msg. 1 of 7       
I spent quite a long time figuring this out, back in the day. Thought I'd save some trouble for anyone else who wanted to do this. It is based on one aircraft, but the same method could be applied to use another aircraft. I'm sorry that the pictures were automatically shrunken, just right click and hit "view image" if you need to see it larger.

This tutorial will show you how you can create yourself a personal guardian angel in the sky. It can be only used in solo player missions (or missions set to multiplayer that you intend for one person to play on), as AI will not sync over networks in Halo 1. In case you know nothing at all about using your Sapien I'll start at the beginning:

Preparing Your Scenario

Open your scenario file, then edit the vehicle palette (Note: if you're unsure how to do this, or if you get an error while doing it, see the help section at the bottom). Go to your vehicles section and find an aerial vehicle you want and STOP! Don't you dare click "banshee"! For this to go smoothly, we will need to use the "npelican" gunship, a special version of the pelican from Tiamat's Hugeass. If you don't have it, click here to download it, then copy and paste the tags into your tags folder using the same paths that they came in: http://hce.halomaps.org/index.cfm?fid=1220 Do not overwrite files during this transfer.

Now then, we still need one on the map. So spawn one up out of sight, facing the direction you want it to be heading when it is flown (make sure it's not too high up in the air, remember vehicle ceilings! If you want to change the vehicle ceiling, see the help section at the bottom). Check the "allowed" boxes for all gametypes (not the "default" boxes, though!) and also check the "not created automatically" box. Now name it "gunship" (of course the name doesn't matter, but that is what the script I provided will be referring to it as). So far you should have something like this:




Now we have a ship that can protect you. But who's going to fly it? Create a biped (type doesn't matter, pick your favorite) also somewhere out of sight, name him "pilot", and create another named "gunner", then check the "not created automatically" boxes for both.




And every good pilot needs a brain. So in hierarchy view, click the ai folder, then the encounter folder, and then click the "new instance" button at the top of that window. Name this encounter "pilot". Now inside the encounter, click squads and then "new instance". Name this squad "pilot" as well, to simplify things. Set the encounter team (if your map is set to multiplayer, 0 is red team and 1 is blue team; if your map is set to solo, 0 means to use the default team specified in the bipeds' tags, 1 is for the player's team, and the rest will all be enemies). At this time, download the following attachment: http://www.cereal-killer.tucker933.com/TCK%27s%20Mods/pilot.zip It contains special actor and actor_variant tags to be used for (what else?) pilots.Add them to "tags\characters\cyborg". Now go into sapien, click "edit types" and in the dropdown box at the top, find "actor variants". Add the actor variant you just downloaded. Now click done and set the squad "pilot" to that actor type.





Next, create a command list named "support_path". Click on "command lists" right below encounters and hit "new instance". Two new folders will be underneath it, points and commands. Go to "points" and these work just like objects, right-click in game-view to place a new one, left-click and hold on it to move it around. Place these in a looping path around the map (on the ground, for now). Don't do too many, usually less than 12 works best. Now, go to your vehicle in hierarchy view, and highlight the "z" coordinate. Right-click and copy it, then paste it into the "z" coordinate for all of your points. This will keep them at the same level as your ship.



Now go into "commands". Click new instance, then in properties select "go to" in the "atom type" dropdown box. In the destination dropdown box, select your first point. Then hit new instance again and do one for your next point and so on. When you have one for each point, click "new instance" one more time. In atom type, click "loop". For "modifier" put "always" and for "command" click your very first command.




Making Some Necessary Changes in Guerrilla

Minimize Sapien and open Guerrilla. In guerrilla open the npelican.vehicle and scroll all the way to the bottom. Go up 6 options from the bottom and you will find "ai throttle maximum". It should be unchanged, but we can't have them zooming around at full speed crashing into random stuff, now can we? Unless you for some reason enjoy watching your hard work fail miserably, set this to .5, that is the safest speed that AI can travel at in a pelican. Then right above it, set "ai steering maximum" to 180.



Script Creation and Implementation

You've got all the aspects you need. Now you just have to get the two guys into the ship and get them to fly around and shoot. Go to "data\levels\[your map path]\" then add a new folder called "scripts". Inside scripts, make a notepad text file. In the text file, "click file > save as" and name it whatever you want, but the important part is to click "all file types" at the bottom, and then save it as a .hsc file, not a .txt.



Now, be sure you're in the .hsc file. Delete the original text file to avoid confusion. Copy and paste this:

(script startup air_support
(sleep_until (= (unit_get_current_flashlight_state (unit (list_get (players) 0))) true))
(object_create gunship)
(object_create pilot)
(object_create gunner)
(ai_attach gunner pilot)
(ai_attach pilot pilot)
(unit_enter_vehicle pilot gunship "w-driver")
(unit_enter_vehicle gunner gunship "w-passenger")
(ai_command_list_by_unit pilot support_path)
)

This script will wait until you press flashlight, and when you do BAM! Instant air support! If you'd like it to activate under different conditions, just ask.

Save it, then close it. Go back to sapien and click "file > compile scripts". It should say "scripts successfully compiled" if it says something else, comment and post what it told you.

Help Section

If you need help with adding vehicles, go to this tutorial: http://www.modhalo.net/index.php?/topic/22787-how-to-add-a-variety-of-tags-with-sapien/

If you want to change the vehicle ceiling, follow these steps:

1. Open your map's bsp in guerrilla (scenario_structure_bsp, it should be in the same folder as the scenario).
2. It might take a while to load. Don't fret, it'll get there eventually!
3. Once it loads, you should see it right there at the top:



Just raise the ceiling maybe, eh, 20 units if it's giving you problems.

Final notes: if you have any more questions, please don't hesitate to comment, even if you think they're dumb. Hope this is enjoyable for you! Don't forget to subscribe and thu- owait.

Download this tutorial: http://hce.halomaps.org/index.cfm?fid=5847
Edited by The Cereal Killer on Apr 12, 2011 at 12:18 PM


Pepzee
Joined: Sep 9, 2010

Retired Halo Modder


Posted: Apr 3, 2011 08:21 PM    Msg. 2 of 7       
Subscribed!

A question though, do you still have to check off all of the allowed boxes if we are doing single player?

You should also upload this to Halo Maps, that way more people will see it.


The Cereal Killer
Joined: Mar 18, 2011

Scripts, AI, cutscenes, ui_widgets, animation.


Posted: Apr 3, 2011 08:52 PM    Msg. 3 of 7       
No if it's solo, no need to check the "allowed" boxes. However, it won't affect it if you do.

And I may upload it, didn't think of that :)


Alberto
Joined: Mar 6, 2011

Disillusioned by the internet. Getting a life..


Posted: Apr 3, 2011 08:53 PM    Msg. 4 of 7       
This was already on another site, right? Ah, Modhalo.


The Cereal Killer
Joined: Mar 18, 2011

Scripts, AI, cutscenes, ui_widgets, animation.


Posted: Apr 3, 2011 09:24 PM    Msg. 5 of 7       
Quote: --- Original message by: Alberto
This was already on another site, right? Ah, Modhalo.


Yes it was, I posted it there originally a few months back.


SlappyThePirate
Joined: Aug 24, 2009

You are irritating, I'll release nothing


Posted: Apr 3, 2011 09:37 PM    Msg. 6 of 7       
Quote: --- Original message by: The Cereal Killer
And I may upload it, didn't think of that :)
You shouldm shouls, should. Stuff lasts longer on the site, and gets kinda ignored on the forum (especially technical).


The Cereal Killer
Joined: Mar 18, 2011

Scripts, AI, cutscenes, ui_widgets, animation.


Posted: Apr 12, 2011 12:15 PM    Msg. 7 of 7       

 

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 12:17 PM 140 ms.
A Halo Maps Website