Home   Help Search Login Register  

Author Topic: HALO  (Read 3395 times)

0 Members and 2 Guests are viewing this topic.

Offline sharkattack

  • Former Staff
  • ****
HALO
« on: 09 Sep 2007, 14:08:02 »
Hi ..
cant seem to my head around this  ???

how could i create a soldier in a parachute in a position close to the players ( who would also be in a parachute)

many thanx

"HOLY SARDINE" - see Shark-Attack meet his match

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: HALO
« Reply #1 on: 09 Sep 2007, 14:23:22 »
You may create the soldier, create a cute, move the chute near the players and then moveInDriver your soldier in the chute.

Offline sharkattack

  • Former Staff
  • ****
Re: HALO
« Reply #2 on: 09 Sep 2007, 14:32:16 »
hey
thanx for swift reply mandoble

i can create the units and the chutes its getting the positioning correct
ideally id like to create 3 paras in flight in a close formation to the player

any advice    :good: 
"HOLY SARDINE" - see Shark-Attack meet his match

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: HALO
« Reply #3 on: 09 Sep 2007, 14:50:53 »
Do you have any problem for that close formation?

Offline sharkattack

  • Former Staff
  • ****
Re: HALO
« Reply #4 on: 09 Sep 2007, 14:54:11 »
yup
i dont know how to relay position  of created unit to that of player in flight  :-[
« Last Edit: 09 Sep 2007, 14:55:57 by shark attack »
"HOLY SARDINE" - see Shark-Attack meet his match

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: HALO
« Reply #5 on: 09 Sep 2007, 15:12:18 »
Code: [Select]
;5m to the right of player's vehicle (his chute)
_pos1 = (vehicle player) modelToWorld [5,0,0]

;5m to the left of player's vehicle (his chute)
_pos2 = (vehicle player) modelToWorld [-5,0,0]


Offline sharkattack

  • Former Staff
  • ****
Re: HALO
« Reply #6 on: 09 Sep 2007, 16:13:41 »
this is what i have so far

para .sqs
=======

chute = createVehicle ["ParachuteWest", position player, [], 0, "FLY"];
~2
"SoldierWPilot"createUnit [position chute,group team1,"this moveindriver chute"];
----------------------------------

it works fine  for one player

how would i incorporate the  values you have given, to the para script
so that each para is created in a close formation to the player  ??

----
edit
----
the easy way seems to be to include a slight delay in between the creation of each para  as the drift of the chute seems to create a close formation of its own

but for future reference  any advice on how to  crerate units in a more accurate formation  would be more than welcome
« Last Edit: 09 Sep 2007, 16:28:37 by shark attack »
"HOLY SARDINE" - see Shark-Attack meet his match

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: HALO
« Reply #7 on: 09 Sep 2007, 16:25:38 »
Chutes in circular formation around player

Code: [Select]
_num_chutes = 4
_radius = 6
_i = 0
_delta = 360 / _num_chutes
#create_formation
_pos = [(getPos (vehicle player) select 0)+sin(_delta * _i)*_radius,(getPos (vehicle player) select 1)+cos(_delta * _i)*_radius,getPos (vehicle player) select 2]
chute = createVehicle ["ParachuteWest", _pos, [], 0, "FLY"];
~0.1
"SoldierWPilot"createUnit [position chute,group team1,"this moveindriver chute"];
_i = _i + 1
?_i < _num_chutes: goto "create_formation"

Offline sharkattack

  • Former Staff
  • ****
Re: HALO
« Reply #8 on: 09 Sep 2007, 16:33:15 »
excellent ..  thanks very much  mate   :)

i will give it a try  and let you know how it goes

many thanks    :good:

edit
===

works like a treat  many thanx  :good:
« Last Edit: 10 Sep 2007, 18:01:04 by shark attack »
"HOLY SARDINE" - see Shark-Attack meet his match

Offline sharkattack

  • Former Staff
  • ****
Re: HALO
« Reply #9 on: 22 Sep 2007, 13:49:47 »
hi the above script is excellent
however would it be possible to add a custom weapons loadout
to the created para jumper ?

many thanx
"HOLY SARDINE" - see Shark-Attack meet his match

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: HALO
« Reply #10 on: 22 Sep 2007, 14:47:52 »
Yes,
Code: [Select]
_num_chutes = 4
_radius = 6
_group = group team1
_i = 0
_delta = 360 / _num_chutes
#create_formation
_pos = [(getPos (vehicle player) select 0)+sin(_delta * _i)*_radius,(getPos (vehicle player) select 1)+cos(_delta * _i)*_radius,getPos (vehicle player) select 2]
_chute = createVehicle ["ParachuteWest", _pos, [], 0, "FLY"];
~0.1
_soldier = _group createUnit ["SoldierWPilot",getPos _chute, [], 0, "NONE"]
_soldier moveInDriver _chute
removeAllWeapons _soldier;
_soldier AddWeapon "whateverweaponyoulike"
_i = _i + 1
?_i < _num_chutes: goto "create_formation"


Offline sharkattack

  • Former Staff
  • ****
Re: HALO
« Reply #11 on: 22 Sep 2007, 15:53:59 »
hey thanx again mandoble ..

ps is there a way to ensure fellow parajumpers always start above you at the min sometimes they can start below positon of player dosnt look right  ive tried but am failing big time

again many thanks for all youre help
"HOLY SARDINE" - see Shark-Attack meet his match

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: HALO
« Reply #12 on: 22 Sep 2007, 16:30:44 »
Try 6m above player's pos.

Code: [Select]
_pos = [(getPos (vehicle player) select 0)+sin(_delta * _i)*_radius,(getPos (vehicle player) select 1)+cos(_delta * _i)*_radius,(getPos (vehicle player) select 2) + 6]

Rhodesia

  • Guest
Re: HALO
« Reply #13 on: 30 Sep 2007, 19:05:47 »
Sorry if it seems like i am hijacking this thread and for my newbieness

i have questions that i would like to ask

1. How do i call this script - is this sqs or sqf format ?
2. can this be script be activated by an airplane so that the Halo group can jump from the plane ?

thanks in advance


Offline JasonO

  • OFPEC Patron
  • ****
  • Oh no...
    • The New Life RPG
Re: HALO
« Reply #14 on: 01 Oct 2007, 00:31:21 »
1. [] exec "scriptname.sqs"
2. Would need to be adapted.

this exec "scriptname.sqs
Code: [Select]
_plane = _this select 0
@!(player in _plane)
~2.5

...
Rest of script
...

Should wait for the player to Eject out of the aircraft, 2.5 second pause then carry on with what the script originally did.