Jump to content

B@nditbe

Member
  • Content Count

    9
  • Joined

  • Last visited

  • Medals

Everything posted by B@nditbe

  1. Hi all, in my mission on Dr.No i have a slight problem, because teams are kinda coming every were on that small island and that way trigger off almost all triggers i need to now how to prevent players to trigger off the outro script when not needed. So actually the outro should ONLY start when all players from WEST and RES are in the chopper Players are  from p1 till p12 Is there a line i could put in the activation field that checks if all players are in "chopper" ? And what if certain peeps are dead? Will the outro not start if it has counted players in the chopper but is missing the dead ones ? Thanks...
  2. Nobody knows a simple solution or simple code to check if all teams are in chopper ?
  3. Ok, this is what i've tryed : I first made a script called "onboardcheck.sqs" in my missionfolder. Per information, P1 --> P4 is team1, P5 --> p8 is team2, p9 --> p12 is team3. Team1 and 2 are West, Team3 is Resistance. onboardcheck.sqs <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_ar = [p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12] _i = 0 _c = true #l   ?!alive _ar select _i: _ar - [_ar select _i]   ?!(_ar select _i in chopper) : _c = false   ?_i < 11 : _i = _i + 1, goto "l"   ?_c : OBJ_4,exit   ~5   _c = true   _i = 0   goto "l" Then in the mission i created a trigger within the activation field : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[] exec "onboardcheck.sqs"; This trigger will go off by the presents of anybody that enters that area. I made a second trigger with condition : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">OBJ_4 in the activation field i put : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">OutroWin = true; Third trigger contains in condition : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">OutroWin and in activation field : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[] exec "OutroWin.sqs"; Hope this helps abit to find a solution Idea is that the script checks if all alive players from the 3 teams are in the evac chopper that flies back to base, if they all are outro should start. Greetz...
  4. no go, doesnt work tryed several ways
  5. Nice But forgive me beeing noobish in scripting, but how would it be by just checking if theyre in chopper, not calling the outro, i do that by another trigger. would it only the part : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_ar = [p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12] _i = 0 _c = true #l ?!alive _ar select _i: _ar - [_ar select _i] ?!(_ar select _i in chopper) : _c = false ?_i < 11 : _i = _i + 1, goto "l" Thx in advance
  6. Well, i figured out this works : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">count crew chopper1 == (("alive _x") count units team1) But problem is, i have 3 teams of 4 men, and 1 of that teams is RES
  7. Hi all, i have a anoying problem, in my mission i use a simple chopper extraction script. But my problem is that the chopper will only pick up one team after its landed and then takes off. I have 3 teams of each 4 men, and i want the chopper picks em up all 3. For example this line is in the trigger when the chopper landed and waits until the team boards the chopper before takin off : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">chopper1 flyinheight 1.5; chopper1 land "get in"; [team,chopper1] exec "extraction.sqs"; Is there a way i can adapt this line so the chopper waits until team2 and team3 has boarded to ? Thx in advance
  8. Thx allot guys, so far it all works ! Damn fine scripters here
  9. Ofcourse, its a script by Daddl. I would have asked himself if he wasnt on holiday now Extraction and insertion script or read the scripts here : Exctraction script <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">;script checks if all members of _group are inside _chopper ; ;script by Joltan aka Daddldiddl - August 2002 ;Check my website for OFPR coop missions: www.gogodot.net/ofp.html ;This script was written for my 'Island Cleanup' map. ; ; ;If you use or modify this script for your own missions, please put a ;reference in your readme or the script header! ;---------------------------------------------------------------- ;Global Variable used: unitsin (string) - set to "true" later ;---------------------------------------------------------------- unitsin="false" ;---------------------------------------------------------------- ;define group & vehicle ;---------------------------------------------------------------- _group=_this select 0 _chopper=_this select 1 ;---------------------------------------------------------------- ;main loop checking for team members inside and outside vehicle ;---------------------------------------------------------------- #loop ;wait a bit ~5 ;create arrays team members and units in chopper _ugroup=+(units _group) _ngroup=count _ugroup ;count live team members outside _n=0 _unitsout=0 #looplivecount _unit=_ugroup select _n _n=_n+1 ?((vehicle _unit!=_chopper) and alive _unit):_unitsout=_unitsout+1 ?(_n<_ngroup):goto "looplivecount" ;All live team members in chopper? ?(_unitsout==0):goto "end" goto "loop" ;---------------------------------------------------------------- ;end script ;---------------------------------------------------------------- #end ;here I would unlock the next waypoint be toggling a trigger _chopper flyinheight 50 unitsin="true" exit Insertion script <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">;script checks if all members of _group are outside _chopper ;_group is any group of units and _chopper any kind of vehicle ;it also checks if leader is already outside vehicle. After a certain time ;the script starts moving units outside the vehicle in case they didn't leave ;by themself. This way units won't get stuck in vehicles! ;You can define distance and angle relative to the vehicle, where the units ;should run to after getting out. ; ;script by Joltan aka Daddldiddl - August 2002 ;Check my website for OFPR coop missions: www.gogodot.net/ofp.html ;This script was written for my 'Find The Chopper' mission. ; ;If you use or modify this script for your own missions, please put a ;reference in your readme or the script header! ;---------------------------------------------------------------- ;define group/vehicle/time in seconds until units get moved out ;---------------------------------------------------------------- unitsout="false" _group=_this select 0 _chopper=_this select 1 _timetogetout=10 ;---------------------------------------------------------------- ;main loop checking for team members inside and outside vehicle ;---------------------------------------------------------------- _leaderout=0 #loop ;wait a second ~1 ;leader out? Already time to kick the lazy bastards out by force? ?((vehicle leader _group)!=_chopper):_leaderout=_leaderout+1 ?(_leaderout==_timetogetout):goto "forceexit" ;create arrays team members and units in chopper _unitsinvehicle=crew _chopper _vehiclecrew=(crew _chopper)-(units _group) _teamincargo=_unitsinvehicle-_vehiclecrew _nteamincargo=count _teamincargo ;Any team members left in chopper? ?(_nteamincargo==0):goto "end" goto "loop" ;---------------------------------------------------------------- ;Force units to leave _timetogetout seconds after leader ;---------------------------------------------------------------- #forceexit _odist=20 _oarc=-90 _vehiclecrew=(crew _chopper)-(units _group) #loop2 _unitsinvehicle=crew _chopper _teamincargo=_unitsinvehicle-_vehiclecrew _nteamincargo=count _teamincargo ?(_nteamincargo==0):goto "end" ;eject unit from chopper _unit=_teamincargo select 0 _unit action ["eject",_chopper] ~2 ;get position and direction of vehicle _vpos=getpos _chopper _vdir=getdir _chopper _edir=_vdir+_oarc ;calculate waypoint for unit _xcenter=_vpos select 0 _ycenter=_vpos select 1 _deltax=_odist * (sin(_edir)) _deltay=_odist * (cos(_edir)) _newy=_ycenter + _deltay _newx=_xcenter + _deltax _unit domove [_newx,_newy,0] goto "loop2"; ;---------------------------------------------------------------- ;end script ;---------------------------------------------------------------- #end ;here I would unlock the next waypoint be toggling a trigger _chopper flyinheight 50 unitsout="true" exit Greetz B@nditbe
×