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....ex.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.
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-ki...0Mods/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.
If you need help with adding vehicles, go to this tutorial: http://www.modhalo.n...gs-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 the .pdf of this tutorial: http://hce.halomaps....ex.cfm?fid=5847