Home   Help Search Login Register  

Author Topic: to "FLY" or not to "FLY" that is the question (solved)  (Read 988 times)

0 Members and 1 Guest are viewing this topic.

Offline loki72

  • Former Staff
  • ****
    • Loki's Nightmare
greetings,

most curious...

if i use this code:

Code: [Select]
_para = createVehicle["Parachute", [((getpos player) select 0) +3 +(random 5), ((getpos player) select 1)+3 +(random 5), ((getpos player) select 2) +1000],[], 0, "FLY"];
i get the same result with:

Code: [Select]
_para = createVehicle["Parachute", [((getpos player) select 0) +3 +(random 5), ((getpos player) select 1)+3 +(random 5), ((getpos player) select 2) +1],[], 0, "FLY"];
both start the player about 50m up.

why and how is the "FLY" usurping the select 2 variable?

thx
« Last Edit: 09 Sep 2008, 01:57:03 by loki72 »

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: to "FLY" or not to "FLY" that is the question
« Reply #1 on: 09 Sep 2008, 01:47:44 »
Because that is what "FLY" does: It starts you at an arbitrary 50m above the ground. If you want a specific height, then setPos after creation:
Code: [Select]
_para = createVehicle ["Parachute", getPos player,[], 0, "FLY"];
_para setPos [((getpos player) select 0) +3 +(random 5), ((getpos player) select 1)+3 +(random 5), ((getpos player) select 2) +1000];
« Last Edit: 09 Sep 2008, 01:52:45 by Spooner »
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline loki72

  • Former Staff
  • ****
    • Loki's Nightmare
Re: to "FLY" or not to "FLY" that is the question
« Reply #2 on: 09 Sep 2008, 01:56:49 »
ah-ha...

"fly" was catching the selects... by breaking it up and then setPos, it takes the variables into account.

thanks

 :D