Jump to content
Sign in to follow this  
frezinator

Need help on Scripting (HALO jump option for vehicle)

Recommended Posts

http://www.armaholic.com/forums.php?m=posts&q=8052

here is a mission with halo.. dowload and edit to see the scripts.. http://www.armaholic.com/page.php?id=11002

also use this

[_unit] spawn BIS_fnc_halo;

in script when you need parachute and this

[this, 5000] exec "ca\air2\halo\data\Scripts\HALO_init.sqs"

for free fall

i found this , also for vehicle

Put that script in the vehicle init field or at a trigger so the object has an menu action when you go close to it:

Code:

name_of_object addaction ["HALO jump", "letsjump.sqs"]; 

(name_of_object is the name of the object who will have the action attached to it. it can be anything else)

Create two script files in the mission directory:

"letsjump.sqs"

Code:

_userteleport = _this select 1
_text = "Left click on the map to jump!!"
TitleText [_text,"Plain"]
onMapSingleClick "player setPos _pos;[_userteleport] exec ""Halo1.sqs"";onMapSingleClick """""

This will give you text on the screen that you must go to the map and click the location where you want to be dropped from.

"Halo1.sqs"

Code:

_userhalo = _this select 0
[player,3000]exec "ca\air2\halo\data\Scripts\HALO_init.sqs"

You can change the altitude in meters for the drop by changing the "3000" value.

And you're done !

Edited by dragonsyr

Share this post


Link to post
Share on other sites
http://www.armaholic.com/forums.php?m=posts&q=8052

here is a mission with halo.. dowload and edit to see the scripts.. http://www.armaholic.com/page.php?id=11002

also use this

[_unit] spawn BIS_fnc_halo;

in script when you need parachute and this

[this, 5000] exec "ca\air2\halo\data\Scripts\HALO_init.sqs"

for free fall

i found this , also for vehicle

Put that script in the vehicle init field or at a trigger so the object has an menu action when you go close to it:

Code:

name_of_object addaction ["HALO jump", "letsjump.sqs"]; 

(name_of_object is the name of the object who will have the action attached to it. it can be anything else)

Create two script files in the mission directory:

"letsjump.sqs"

Code:

_userteleport = _this select 1
_text = "Left click on the map to jump!!"
TitleText [_text,"Plain"]
onMapSingleClick "player setPos _pos;[_userteleport] exec ""Halo1.sqs"";onMapSingleClick """""

This will give you text on the screen that you must go to the map and click the location where you want to be dropped from.

"Halo1.sqs"

Code:

_userhalo = _this select 0
[player,3000]exec "ca\air2\halo\data\Scripts\HALO_init.sqs"

You can change the altitude in meters for the drop by changing the "3000" value.

And you're done !

I found one problem can u help me?

Edited by frezinator

Share this post


Link to post
Share on other sites

I found a problem. when I respawn then go into a vehicle, the halo option disappears... can u help me plzz??? btw im using the script from the first website link that u gave me

Share this post


Link to post
Share on other sites

if you run the halo from init.sqf with execvm then make sure that the command of the halo is inside spawn [] ,

like this

[] spawn {
		waitUntil { alive player }; // waitUntil player has respawned
		execVM "halo.sqf"; 
	};	

how you run the halo?

Share this post


Link to post
Share on other sites
if you run the halo from init.sqf with execvm then make sure that the command of the halo is inside spawn [] ,

like this

[] spawn {
		waitUntil { alive player }; // waitUntil player has respawned
		execVM "halo.sqf"; 
	};	

how you run the halo?

Where do I put that? sorry im still new in editing and scriptings

This is the script that I used for my halo:

I put this in an empty vehicle init's box.

this addaction ["(Halo)","Halo.sqs"];

Then I created two files called Halo.sqs and Halo1.sqs

Halo.sqs

_first = _this select 0
_text = "Halo by single-clicking on the map.You start at a height of 500 above your current location."
?(format["%1",_first] == "Again"): 
TitleText [_text,"Plain"]
;forceMap true
#Marker_1
onMapSingleClick "_StartLocation = player setPos _pos;[_StartLocation] exec ""Halo1.sqs"";onMapSingleClick """""
;
exit

Halo1.sqs

[Player,500]exec "ca\air2\halo\data\Scripts\HALO_init.sqs"
exit

im not using the init.sqf by the way. I put an addaction called "this addaction ["(Halo)","Halo.sqs"];" in a vehicle init's box.

The problem is when I respawn then go into a vehicle, the halo option disappears...

Here also a link where I get these scripts from: http://www.armaholic.com/forums.php?m=posts&q=8052

Edited by frezinator

Share this post


Link to post
Share on other sites

my few knowledge tells me that you need to name your helo and you must set in your mission init.sqf on spawn part , the addaction for your heli.

name your helicopter heli1,

open your init.sqf and add

[] spawn {
		waitUntil { alive player }; // waitUntil player has respawned
		heli1 addaction ["(Halo)","Halo.sqs"];};

check this

im a noob also , so im not sure for the correct code, but you need to set the spawn part in your init.

Share this post


Link to post
Share on other sites

A waituntil in the init.sqf is really bad. Especially a waituntil {alive player} because the init.sqf runs BEFORE the player spawns. Just saying.

Also dragonsyr what your piece of code does is it waits until the player is alive to add an action to a helo. The init.sqf runs when the mission starts so this makes no sense.

Also to see the action you got to be in the helo.

Share this post


Link to post
Share on other sites

Ok. i post wrong code ... sorry, now i m in my computer and i post the good one that im using in one of my missions and Working

i run this in my init.sqf

// have addaction on respaun.........................

[]spawn
{
while {true} do
{
// squadron list.............................
null=[] execVM "scripts\wbg_array.sqf";

//.......................................
waitUntil {!alive player};
waitUntil {alive player};

};
};

you can change my line with yours

heli1 addaction ["(Halo)","Halo.sqs"];};

also you can put a trigger that monitor your heli when respaun .

make a trigger 0 - 0 , on condition put (assume that you named your heli heli1)

alive heli1

and on act put

heli1 addaction ["(Halo)","Halo.sqs"];
Edited by dragonsyr

Share this post


Link to post
Share on other sites

also you can put a trigger that monitor your heli when respaun .

make a trigger 0 - 0 , on condition put (assume that you named your heli heli1)

alive heli1

and on act put

heli1 addaction ["(Halo)","Halo.sqs"];

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  

×