lilphil 0 Posted November 21, 2002 i was wondering if someone could help me out, im trying to make a squad parachute out of a chopper but have no luck. Where do i have to put the script file? Is there anything that i could be doing wrong? I doublechecked the script, it seems to be exact to the tutorial other then the squad and helo names. Share this post Link to post Share on other sites
ralphwiggum 6 Posted November 21, 2002 moving to mission editing and scripts. place the script file under <flashpoitn directory>/users/yourname/missions/<name of your mission folder> Share this post Link to post Share on other sites
lilphil 0 Posted November 21, 2002 ok, i did that. It doesnt say script not found, but when i move to the waypoint where they should exec the script, it just does nothing. Whos name do i put to exec the script? A unit name like the squad leader(in my case, dawn) Any ideas There must be something im doing wrong, just cant figure out what it might be. Im running version 1.46 Share this post Link to post Share on other sites
ralphwiggum 6 Posted November 21, 2002 it depends on script. see if you can locate instructions that came with the script. make a trigger or at the 'activate' part of waypoint, place something like [] exec "scriptname.sqs" now, if you have instruction for script, it will tell you what variables to pass in '[]' section. if you are new to scripting, i'd suggest you get a tutorial. Johan Gustavson's script tutorial is the one i learned with. it should be available at OFPEC Share this post Link to post Share on other sites
jawk2 1 Posted November 21, 2002 before u search the whole Johanns tutorial i give u a more precise answer *point out a finger on ralph lol* with [] exec "trucbidule.sqs  within the script u should find something like this: variable = _this select 0 like: _everything = _this select 0 -----> the _this select 0 is replace by the very first thing u put into the []... it can be variable (numeric)... array like "Hello"... even a script  like [100,"exec whatever.sqs"] exec "nexttonothing.sqs" example i wrote a script to kill camper called anticampeur.sqs that use that thing *like 90% script here*: create a trigger that will be the alive detector: -the radius effect of the trigger doesnt matter even out of range it does activate -repeating -write in condition:  alive US1 -write in on activation:  [uS1,0] exec "anticamper.sqs" create a unit called in name field: US1 put this script with the name "anticamper.sqs" // a pointer called update to do a loop #update // variable name of player _joueur = _this select 0 // variable position player at time A A=0 _tempA = getpos( _joueur ) // wait 60 seconds ~60 // position player at time B B=Aplus 60 _tempB = getpos ( _joueur ) // player died during the process script restart ?!Alive _joueur : exit // compare the two position less or not than 1 ? (((_tempA select 0)- (_tempB select 0)) + ((_tempA select 1) - (_tempB select 1)) + (( _tempA select 2) - ( _tempB select 2))) <=1 : goto "tue" // the loop goto "update" // part called when position at time A= position at time B #tue // name of the camper showed to everyone titletext [format ["%1 will be executed for excessiv camping",name _joueur],"Plain"] ~1 // killing the camper _joueur setdammage 1 exit ***script without the explanation*** anticamper.sqs </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> #update _joueur = _this select 0 _tempA = getpos( _joueur ) ~60 _tempB = getpos ( _joueur ) ?!Alive _joueur : exit ? (((_tempA select 0)- (_tempB select 0)) + ((_tempA select 1) - (_tempB select 1)) + (( _tempA select 2) - ( _tempB select 2))) <=1 : goto "tue" goto "update" #tue titletext [format ["%1 will be executed for excessiv camping",name _joueur],"Plain"] ~1 _joueur setdammage 1 exit <span id='postcolor'> ----> u can use the thing select X to point out into an array and take only the information u need *i used it to take the coordinate separately and write a logical addition* the _joueur will be the name of the thing u put into the [_joueur,X,Y,Z] exec "whatever.sqs" translate []exec "*.sqs" as  [select 0, select 1, select 2 ect...] exec "*.sqs" Share this post Link to post Share on other sites
BaronVonRed 0 Posted November 21, 2002 If all you want to do is have the squad parachute, you don't even need a script. Here is The Baron's straight-forward, easy to learn parachute technique: 1) Create the chopper, name it chopper. Set it's "SPECIAL" to "FLYING". In it's init field, put: this flyinheight 100 2) Create your (west) squad (on the ground). Be sure they are not "grouped" to the chopper. Name each squad member (s1, s2, s3, etc). Set all their "SPECIAL" to "IN CARGO"; In each of their INITIALIZATION fields, put this: this assignascargo chopper; this moveincargo chopper 3) Assign the waypoints to the chopper so that it flys over the area of the drop. 4) Make a trigger where you want the drop (which should coincide with the chopper's waypoints). Make sure there are no other WEST soldiers inside the trigger detection range. TRIGGER: (once) AXIS: 20x20 CONDITION: west present ACTIVATION: s1 action["eject", chopper]; s2 action["eject", chopper]; s3 action["eject", chopper]; unassignvehicle s1; unassignvehicle s2; unassignvehicle s3 You can even make yourself one of the squad members and it will automatically eject you. You can also fancy it up however you want (including the use of foreach in the activation field, but I suggest you get the above working before you make any changes). If, for any reason, you cannot get this to work, send me your email and I will send you the mission files where I have implemented this and it works. Share this post Link to post Share on other sites
InqWiper 0 Posted November 21, 2002 I used this script to eject 2 squads from a chinook: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">unassignvehicle m1 m1 action ["Eject",Chopper] ~0.5 unassignvehicle m2 m2 action ["Eject",Chopper] ~0.5 unassignvehicle m3 m3 action ["Eject",Chopper] ~0.5 unassignvehicle m4 m4 action ["Eject",Chopper] ~0.5 unassignvehicle m5 m5 action ["Eject",Chopper] ~0.5 unassignvehicle m6 m6 action ["Eject",Chopper] ~0.5 unassignvehicle m7 m7 action ["Eject",Chopper] ~0.5 unassignvehicle m8 m8 action ["Eject",Chopper] ~0.5 unassignvehicle m9 m9 action ["Eject",Chopper] ~0.5 unassignvehicle m10 m10 action ["Eject",Chopper] ~0.5 unassignvehicle m11 m11 action ["Eject",Chopper] ~0.5 unassignvehicle m12 m12 action ["Eject",Chopper] ~0.5 unassignvehicle m13 m13 action ["Eject",Chopper] ~0.5 unassignvehicle m14 m14 action ["Eject",Chopper] ~0.5 unassignvehicle m15 m15 action ["Eject",Chopper] ~0.5 unassignvehicle m16 m16 action ["Eject",Chopper] ~0.5 unassignvehicle m17 m17 action ["Eject",Chopper] ~0.5 unassignvehicle m18 m18 action ["Eject",Chopper] exit<span id='postcolor'> just name the units "m1" to "m18" and name the chopper "Chopper". Share this post Link to post Share on other sites
tek74 0 Posted November 21, 2002 If you de-PBO the 'Chinook' mission, you'll find a very nifty script for ejecting troops with an action code. Best of all, it works when dropping of troops at low altitude in a hurry. t74 Share this post Link to post Share on other sites