Home   Help Search Login Register  

Author Topic: Teleport units to damaged vehicle  (Read 2665 times)

0 Members and 1 Guest are viewing this topic.

Offline eegore

  • Members
  • *
Teleport units to damaged vehicle
« on: 17 Feb 2014, 18:19:42 »

  I am using setdamage 1 to drop a UH1Y out of the sky at low altitude and would like to teleport 3 infantry to its location and kill them so there are 3 bodies around the crash site.  The player is to try to search around for the bodies.

  My terrible editing logic says I could try to teleport 3 game logics to the UH1Y right before it is destroyed (setdammage .9 trigger)  and then teleport the men to the game logics.  This way the 3 infantry aren't stacked on top of each other and they might be spread around a bit if the helo is moving when the first damage trigger is activated.

  man1 setposATL Helo   doesn't work.  I also cant teleport a game logic this way.

  I have a similar thread here but some of the commands I never got to work.  Such as:
Code: [Select]
this && (getPosATL (helo select 2) < 5)

  I'm sure theres a better method than what I am thinking. 

http://www.ofpec.com/forum/index.php?topic=35859.msg246183#msg246183

 

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Teleport units to damaged vehicle
« Reply #1 on: 17 Feb 2014, 19:45:39 »
Quote
man1 setposATL Helo   doesn't work.
Because it should be man1 setPosATL (getPosATL Helo)

Quote
this && (getPosATL (helo select 2) < 5)
This works only if you have the rest of the trigger setup correctly (ie: activated by the vehicle present [group helo with the trigger]), and can be sure that the dropping helo stays inside the trigger area.

If you detect the chopper with a trigger you can have that trigger execute a short script that puts the bodies around the chopper (way more feasible than trying to do it with just triggers).
« Last Edit: 17 Feb 2014, 19:50:45 by h- »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline eegore

  • Members
  • *
Re: Teleport units to damaged vehicle
« Reply #2 on: 18 Feb 2014, 05:29:09 »
  Yes I was thinking a script might be best.  

  Something along the lines of when the first damage trigger is activated it activates

man1 setPosATL (getPosATL Helo)

  Then a 2 or 3 second delay between each additional crew.  Again so they don't all just stack on top of each other.  That is pretty much all I have left to do is figure out how to not have the crew all in one spot.

  Also this code says type array expected number, that is why I never got it to work:

Code: [Select]
this && (getPosATL (helo select 2) < 5)
  I don't know h0ow to set it up correctly so the code is accepted.  Even if he trigger is grouped with the helo.
« Last Edit: 18 Feb 2014, 16:51:26 by eegore »

Offline schuler

  • Contributing Member
  • **
Re: Teleport units to damaged vehicle
« Reply #3 on: 19 Feb 2014, 09:34:59 »
dead1,dead2,dead3 SetPos (getPos helicrash) thats what i would do. just a work around
Semper Fi

Offline eegore

  • Members
  • *
Re: Teleport units to damaged vehicle
« Reply #4 on: 19 Feb 2014, 18:28:09 »

  Maybe this example mission will help.

  You may have to play it a few times ( its only a minute long ) to see where my issues are.  For instance sometimes the helo will blow up on a tree before the final height trigger activates so the crew and burning game logic will not teleport at all.

  I think because the helo blows up before it reaches the trigger height so the helo no longer exists.

  The idea is that the player can witness some tail rotor failure then go see if any crew survived.  The eventual idea is to use a distance trig at the "wreck" game logic to give the player a new objective.

  Or have some documents on one of the crew that activates a trigger when they are picked up.  That's another issue though that I can learn how to do next.

http://www.sendspace.com/file/4y2gy3

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Teleport units to damaged vehicle
« Reply #5 on: 23 Feb 2014, 11:56:46 »
My take on the crash site matter, attached.
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline eegore

  • Members
  • *
Re: Teleport units to damaged vehicle
« Reply #6 on: 23 Feb 2014, 21:18:08 »

  Thanks for that example mission.