Jump to content
Sign in to follow this  
Reggaesmurf

Teleport group to freefall positions in the sky

Recommended Posts

I'm trying to make a mission somewhat based on Homer Johnston's Operation Mongoose (Link) for lower player counts.

1. I'm trying to make it so that, after the in-game mission briefing, 1 player (me) should be able to make his group teleport into the sky (via addaction-flagpole) for a parachute jump. Right now, i'm able to do this for 1 player only, not for a group.

It doesn't have to be from a plane.

2. If possible i would like the teleport to be somewhat random. The group should teleport to a different place everytime the mission is replayed.

3. Is there any possibility to make the players inside the group teleport a minimum of distance away from eachother? So they don't fly too close to eachother and to make sure the players need to find eachother and regroup after landing.

4.Currently i'm doing this without any HALO script, but i would like the players to be able to know their height ASL while falling, is there any easy way to add this?

Thx for the help!

Share this post


Link to post
Share on other sites

it's all possible - you'll need to run the script on the server to get the group members to be affected by it

take a look at how halo works in evolution - its called from the mission sensor (like your flagpole) and throws you up to the halomarker

then take a look at the side mission mlpat (land patrol) - this has a feature that randomises the site based on two markers at extreme opposite corners - SWpoint and NEpoint

make this randomise your halomarker first time out then (randomise it again in a smaller area for each player) and you're away.

you use forEach group _player to run it on each of the group members

Edited by eggbeast

Share this post


Link to post
Share on other sites

1&2&3&4:

private ["_alt","_caller","_randomJumpMkr","_pos","_dist","_num"];
if (isServer) then {
waitUntil {!isNil "bis_fnc_init"};
_caller = _this select 1;
_randomJumpMkr = ["jump1","jump2","jump3","jump4","jump5","jump6"] call BIS_fnc_selectRandom; //require functions module on map plus markers named as in array
_pos = getMarkerPos _randomJumpMkr;

{_x setpos [(_pos select 0)+(random 50),(_pos select 1)+(random 50),1000+(random 50)];

_alt = (getpos _x select 2);
[_x, _alt] exec "ca\air2\halo\data\Scripts\HALO_init.sqs";
_x setDir 0; //can be anything from 0 - 360

_handle = [] execVM "alt02.sqf";

} forEach units group _caller;
};

Not tested or checked for errors but should give you some ideas, must be used with an addAction for the _caller part to work.

alt02.sqf:

  
while {true} do {
hintSilent format ["Alt:%1 | Track:%2", round(getpos player select 2), round(getdir (vehicle player))];

if (!(alive player) || (getpos player select 2) <=1) exitwith{
hintSilent "";};
};

run something like that locally on each client to get the height / heading shown to each player

edit: tested and removed errors

Edited by Mattar_Tharkari
error: { in script

Share this post


Link to post
Share on other sites

Thx for the replies, i'll try out these suggestions this weekend and keep the thread updated!

EDIT: I did some tests and I got the script from Mattar_Tharkari working. Thx.

I have another question though: Is there any possibility to add a minimum seperation between the group of players when they teleport. Right now the players fly next to eachother and i would like them to land away from eachother so they have to try and regroup after landing.

Edited by Reggaesmurf

Share this post


Link to post
Share on other sites

Hi, I was able to some more testing with 2 friends in mp. It seems that when i try the HALOjump, the group members do get teleported into the sky, but i'm the only one with a prachute. The other guys just fall to their death. They don't get the option to open chute...

Am I missing something to make this work in mp?

Share this post


Link to post
Share on other sites
Hi, I was able to some more testing with 2 friends in mp. It seems that when i try the HALOjump, the group members do get teleported into the sky, but i'm the only one with a prachute. The other guys just fall to their death. They don't get the option to open chute...

Am I missing something to make this work in mp?

MP scripting is a bit of a minefield due to locallity - if your friends are standing up as they fall, instead of in the parachute position then it's this bit:

[_x, _alt] exec "ca\air2\halo\data\Scripts\HALO_init.sqs";

You may need to execute that on each machine, good luck - see if there is a MP HALO script somewhere for further ideas? With the (isServer) check it's only running on the host machine - yours.

Edited by Mattar_Tharkari

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×