Jump to content

helicopter scripting


Recommended Posts

i am new to mapping and scripting, I can get enemy units to drop in and fight etc and have completed some maps. i have got as far as getting a tank to move forward down a road and shoot. what i cant do is get an enemy helicopter to fly in and attack. i presumme it would be similar to

<element type="ActivateVehicle" vehicle_id="heli1" start_time="1"/>

<element type="Orderheli" vehicle_id="heli1" ai="true" order="move" position="-37 -16718 0" start_time="1"/>

But i have no idea if yhis is right.

Please help

Thanks

Link to comment
Share on other sites

i would say it would be scripted somewhere along those lines yes,

have you taken a look at the first mission's scripts for reference? i do believe blackhawk 4 makes a lovely entrance near the end in which you could take reference from

Edited by Pave Low
Link to comment
Share on other sites

Hi RDCNemesis,

Welcome to the forums. :thumbsup:

While I have never scripted for GR:AW, in GR:AW2 you need to have a small delay in ordering your vehicle after activating it.

So try changing the start time for the second line to start_time="1.5" if you activate it at the same time as you move it the game may not see the vehicle as being part of the mission before you use the move command.

Link to comment
Share on other sites

Heli will not get very far without some speed!

Try:

<element type="ActivateVehicle" vehicle_id="heli1" start_time="1"/>

<element type="Orderheli" vehicle_id="heli1" ai="true" order="move" position="-37 -16718 0" speed="0.5" start_time="2"/>

Link to comment
Share on other sites

Well been a long time since I scripted for GRAW2 Not tried this version. Installing game now, can have a play along over next few days.

From what I remember, you need to add "starts hovering" or similar in the units file. Or else it drops to the ground on spawn and gets stuck. Have you placed it in front of your spwan for a test? Which heli are youusing?

Link to comment
Share on other sites

hi there,

so if you wanna have that attack helicopter you need to use the mi28.

and as tinker pointed out make sure to hit the right checkboxes when you place it.

and for the scripting 1st this line to spawn it

<element type="ActivateVehicle" vehicle_id="heli1" start_time="0"/>

then you have these 3 options:

this one will let the heli fly to a fixed position and hover there, target true will let it point to the direction it flys, target false could end up to let it fly side or backwards

<element type="OrderHeli" vehicle_id="heli1" order="move" position="9000 -22000 1000" speed="1.0" target="true" start_time="1"/>

this one will let it fly to a fix position and or let it point to 1 specific direction

<element type="OrderHeli" vehicle_id="heli1" order="target" target_rot="0 0 45" position="0 0 0" start_time="1"/>

this one is the most interesting, since the heli will circle around 1 point to guard it

<element type="OrderHeli" vehicle_id="heli1" order="guard" position="0 0 0" inner_radius="10000" outer_radius="15000" start_time="1"/>

when i remember right the helicopter wont accept anymore commands as soon you use the guard command.

you wont need a vehicle ai graph for the helis when i remember right.

also have a look in this wonderfull pdf written by wolfsong, where all script commands are well explained.

bear in mind that not all of em work for coop and even less on dedicated servers.

http://www.ghostrecon.net/files2/index.php?act=view&id=527

Edited by AmEyeBlind
Link to comment
Share on other sites

thanks all for the info but its destined not to work, i put the lines of script in the mission xml created my areas. placed the mi28 on the map moved to where i wanted it to fly to pressed F12 and got the co-ordinates. I placed the co-ords into the script after move position . I save and export, went into graw started the map and the heli was all rady theree shooting and not moving got into area 2 (spawn area) and a second heli entered hovered and started to shoot

BLOODY SCRIPTS :wacko:

:wall:

Edited by RDCNemesis
Link to comment
Share on other sites

The work folder. Are you using W7? I am new to using it here and just created a test map mission in the editor and saved, but cannot find it in my main GRAW folder. Open editor and I can open the level again so it must be there somewhere. Used to XP here.

Got it, run editor as admin.

Link to comment
Share on other sites

hi again,

it sounds like that you didn't hit the sequence spawn checkbox.

in that case the helicopter will be there when the map loads, and when you don't gun it down it will spawn again when the activate vehicle command is used.

it takes a bit to get used to scripting graw, but once you get a hang of it it's easy.

also you could post that heli related lines from the script, would make it a bit easier to help.

Edited by AmEyeBlind
Link to comment
Share on other sites

sequence spawn

Seems to be a lot of differences from graw2 here. Loaded up all my old modding files. Hopefully get this issue sorted out, then you may need to keep a look in here for some questions from me also. <_<

sequence_spawn="false"

Change that to true

Link to comment
Share on other sites

A Massive thanks to Ameyeblind and tinker for the help....My heli spawned, flew forward and shot the crap out of me

many many thanks guys

this is probably the start of some other silly questions once i step beyond the realms of my scripting ability

;)

Link to comment
Share on other sites

  • 2 weeks later...

The work folder. Are you using W7? I am new to using it here and just created a test map mission in the editor and saved, but cannot find it in my main GRAW folder. Open editor and I can open the level again so it must be there somewhere. Used to XP here.

Got it, run editor as admin.

Are you using win7 64bit? if so there is a 32 bit folder which will have program files etc for all your 32bit progs all your Graw files will be in the 32bit folder. im on 32 bit so everything is where i know it should be.

hope this helps

Link to comment
Share on other sites

  • 1 month later...

Just thought I should add this. In the process of backing up my files here and I have only now, just today, found those test levels! :rofl:

C:\Users\My_Name\AppData\Local\VirtualStore\Program Files (x86)\Ubisoft\Ghost Recon Advanced Warfighter\custom_levels

Never even seen that folder before.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...