Jump to content
Sign in to follow this  
HAILO

signal.sqf (smoke and flare signals)

Recommended Posts

BETA Release

Quote[/b] ]

--------------------------------------------------------------------------------

·: signal Script v1.1 for ArmA :·

--------------------------------------------------------------------------------

Signal script for Armed Assault multiplayer mission designers.

This script lets you add a customised pickup and target smoke of flare signaling

system to you mission.

To use the signal script in your mission you will need to do the following:

- If you do not already have init.sqf file made for themission then you can

just copy the contents of files directory directly to the mission directory.

Otherwise do the following:

- Copy the files\signal and files\events directory into your mission directory (So

that the signal and events directory remains)

- Add the contents of files\init.sqf to your mission init.sqf file so that the

signal script init is run at the beginning of mission

It is important that you have the following gamelogic and trigger in your mission:

- ADD A GAMELOGIC NAMED "server"

- ADD A TRIGGER NAMED "JIP", CONDITION "true",

ON ACT. "nil = [] execVM "events\onPlayerConnected.sqf";",

AXIS A "0", AXIS B "0"

The signal script should now launch whenever a player connects to the server.

You can use the custom event scripts "onPlayerConnected.sqf", "onSignalActivated.sqf"

and "onSignalDeactivated.sqf" if you want to detect the smoke for AI CAS or transport

choppers for example (the event scripts are in the events directory).

Note! If you need to do any modifications in the signal script files for

your mission, please mark the modified files as modified by you to avoid

confusing them with the originals.

--------------------------------------------------------------------------------

credits

--------------------------------------------------------------------------------

Made by Hailo <hailo.ceo [at] gmail.com> (www.totaldamage.org)

Smoke FX made by Lethal

--------------------------------------------------------------------------------

license & disclaimer

--------------------------------------------------------------------------------

You are permitted to install and use this software for personal entertainment

purposes only. Any commercial, military or educational use is strictly forbidden

without permission from the author.

You are free to distribute this software as you wish, as long as it is kept 100%

free of charge, it is not modified in any way and this readme file is

distributed with it.

The author takes no responsibility for any damages this program may cause,

use at your own risk.

--------------------------------------------------------------------------------

change log

--------------------------------------------------------------------------------

Version 1.1

* Flare FX script error thrown when initialised - fixed

* events folder created for the onPlayerConnected.sqf, onSignalActivated.sqf and onSignalDeactivated.sqf files

--------------------------------------------------------------------------------

IMPORTANT SETUP NEEDED

If this is not done the join in progress wont work! The following code is in the init.sqf file. Please add the unit names in the array for any playable units. In future releases I will try and make this easier.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

// Use the variable "HLOsSignal_GiveToUnits" to give the signal custom "actions" too.

// Example: SW1 = Soldier West 1, SE1 = Soldier East 1, SG1 = Soldier Guerilla 1, SC1 = Soldier Civilian 1

HLOsSignal_GiveToUnits = [SW1,SW2,SW3,SE1,SE2,SE3,SG1,SG2,SG3,SC1,SC2,SC3];

Notes:

Sample mission is included in the zip file to make it easier to get to grips with.

If you dont set the "HLOsVisableForSides" or "HLOsSignal_GiveToUnits" arrays the scripts will default to all sides and all units in the map (simply keep these arrays commented out in the init.sqf). However the join in progress will not work (see above note).

Flares are used between 19:30 to 04:30.

Will work in..

Join In Progress: Yes

Multi Player: Yes

Single Player: Yes

Respawn: Yes

Added Bonus for you:

I have added some detection scripts to detect the white, red and green smoke granades when thrown. It then replaces the smoke effect as well biggrin_o.gif (try this in the sample mission)

Known Issues / Wish list

* Join in progress does not always work. Needs further testing.

* Need the ability to add the action items to players seperatly

* Must force the script to always attach to the player without the action items so that the enhanced FX can be seen ok (unless the player is not in the HLOsSignal_VisableForSides array).

Setup_GameLogic.jpgSetup_Trigger.jpg

EnhancedFlareFX.jpgEnhancedSmokeFX.jpg

More info at my website: www.totaldamage.org

Download: SignalScriptV1.1.zip

Share this post


Link to post
Share on other sites

wow i was just thinking about this very thing earlier today. looking forward to this biggrin_o.gif

theres just something about marking LZ zones with smoke that's just soo cool notworthy.gif

Share this post


Link to post
Share on other sites

The only thing not working properly is the JIP (I need some help on that one biggrin_o.gif ). If you have ay suggestions to add to the script, I am happy to look into that.

For example I have thought about detecting the smoke and flare, then getting AI CAS or a AI Transport chopper coming along to help.

Share this post


Link to post
Share on other sites

i've been playing around with the particle effects, too. i made this markersmoke a few days ago; if you're interested i can give you the code. i set it up in a way that you can choose the base color freely by setting the RGB value.

markerparticlecb2.jpg

edit: used smaller image

Share this post


Link to post
Share on other sites

If your problem is the fact that your init.sqf isnt started on the JIP players you can use a trigger.

simpley put the scripts that need to be started in the onactivation field.

Then in the conditionfield you put true.

The trigger will be fired on the JIPplayer and the script started.

I had the same problem a couple of weeks ago.

Share this post


Link to post
Share on other sites

@lethal

Wow! that effect looks fantastic. I would very much like to try and use that in my script. Can that effect be done fully with only scripting?

@the unknown

I did not think of trying that biggrin_o.gif So if I use "processInitCommands" in a triggers "onActivation" field it might work? I will give that a go later tonight wink_o.gif

Thanks for the feedback guys.

Share this post


Link to post
Share on other sites

I can also send it to you if you want.

basically the script creates a few particlesources at a position of your choosing. you can also be run as a function in which case it return an array with the particlesources as elements. input parameters are position, color (in the form of [r,g,b], and timeout, which when set to less than 1, makes the smoke run indefinitely (you need that if you run it as a function as you can disable the smoke manually then).

also this isn't properly tested yet to keep an eye out for bugs/oversights etc. feel free to copy and paste any part you need to build your own script of course wink_o.gif

edit: i removed the code from the post. tell me where i can upload it - just noticed the forum broke a few lines and made the script unreadable.

Share this post


Link to post
Share on other sites

Lethal,

I have a copy of your script (thanks), but what's the syntax for using or, or maybe a mission example?

Russ

Share this post


Link to post
Share on other sites
Quote[/b] ]

//

// By lethal

//

// You can run this script with the following code : nil = [_pos, [0,255,0], 180] execVM "misc\smokemarker.sqf";

// The array "[0,255,0]" is the RGB value of the smoke. The "180" is the timeout of the smoke (in seconds), 0 = infinite.

//

// * (0, 0, 0) is black

// * (255, 255, 255) is white

// * (255, 0, 0) is red

// * (0, 255, 0) is green

// * (0, 0, 255) is blue

// * (255, 255, 0) is yellow

// * (0, 255, 255) is cyan

// * (255, 0, 255) is magenta

//

I added this to lethal's script file. The only issue I am having atm with this is it does not work in MP games. I am looking into using the "FIRED" event to try and get all computers to sync when the a given unit fires a smoke shell for example.

You will need to change a line near the top of the script...

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_timeout = _this select 3;

Change To...

_timeout = _this select 2;

I dont think lethal intends this to be used just yet, but it is good work and I like the smoke effect. I hope I can get it working in MP wink_o.gif

Share this post


Link to post
Share on other sites

@ lethal, is there any way to widen the base of the smoke billowing from the ground? I think it would be a cool smoke effect to simulate smoldering remains in city ruins but the base would need to look as if it were a fire originally.

Thanks.

Share this post


Link to post
Share on other sites

Ok, I've found a way to get what *I* wanted, which was colored smoke on the ground at certain places, set off using a trigger.

Below is my "explosive" script, which I use to blow up stuff (or hit stuff with ammo) on specfic NAMED targets (IE a named unit/vehicle or have it hit an invisible H on the ground).

Using my script, I created 4 invisible H's on the ground and named them... then I use a trigger to set off green smoke when my chopper arrives for effect...

I DID:

Placed 2 "H (invisible)" on the ground, named them Targie1 and Targie2

Secondly, setup a trigger with THIS for the activation:

ACTIVATION: [Targie1,"Smokeshellgreen",1] exec "explos.sqs";[Targie2,"Smokeshellgreen",1] exec "explos.sqs";

Cake.

After all, if my script is used to make ammunition explode and simulate bombing runs and such, why not make it set off a smoke cannister? tounge2.gif

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">; ***************************************

;Explosion Script by GuiltyRoachKillar

; Updated by ]KAW[ Rooster aka SATEXAS69

;******************************************

;

;To use make a trigger:

;Activation: [nameofobject,"ammotype",height] exec "explos.sqs"

;

;Example: [target1,"Sh_122_HE",15] exec "explos.sqs"

;

; ***************************************

; This is great for making stuff explode using triggers and such...

;

; OR -

;

; You can simulate a huge bombing run like I have, by making a bunch of "H" objects

; using the INVISIBLE ones, and naming them "target1"... "target2"... and then having

; a plane fly over them setting off the above in a trigger... I stack multiple in a

; single Activation line varying the height for tons of fun in my mission

; called "FORT ROOSTER"

;

; ***************************************

;Get the array parameters and define _pos...

_unit = _this select 0

_ammo = _this select 1

_height = _this select 2

_pos = getpos _unit

;set _pos height according to what's in the array

_x = _pos Select 0

_y = _pos Select 1

_z = ( _pos Select 2) + _height

_pos = [_x, _y, _z]

#b

bomb= _ammo createvehicle _pos

bomb2= _ammo createvehicle _pos

exit

Share this post


Link to post
Share on other sites

How would you make this trigger with script and then activate on all client PCs on MP?

I would like to do this without adding anything to the mission file so the sqf when called will setup any triggers it needs for example. The things i am getting held up on is sync between all the PCs in MP crazy_o.gif

Share this post


Link to post
Share on other sites
How would you make this trigger with script and then activate on all client PCs on MP?

I would like to do this without adding anything to the mission file so  the sqf when called will setup any triggers it needs for example. The things i am getting held up on is sync between all the PCs in MP  crazy_o.gif

If you do exactly as I relayed - you'll have zero multiplayer and sync issues. It works great.

To set off a trigger, I name the chopper say "Chopper" then do a "chopper in thislist" as the condition and the actual detonation calling in the activation.

Cake!

Join up on my FORT ROOSTER map and you can see it in action (Server 207.235.90.250 or look for "#1 ]KAW[ Fort Rooster" in the server list.

- satexas aka ]KAW[ Rooster (your old clannie!wink_o.gif

Share this post


Link to post
Share on other sites
@ lethal, is there any way to widen the base of the smoke billowing from the ground? I think it would be a cool smoke effect to simulate smoldering remains in city ruins but the base would need to look as if it were a fire originally.

Thanks.

yes, no problem at all. i can even throw in a few flames if you like. just give me some time and i can make a few effects for ya smile_o.gif

Share this post


Link to post
Share on other sites
How would you make this trigger with script and then activate on all client PCs on MP?

I would like to do this without adding anything to the mission file so the sqf when called will setup any triggers it needs for example. The things i am getting held up on is sync between all the PCs in MP crazy_o.gif

If you do exactly as I relayed - you'll have zero multiplayer and sync issues. It works great.

To set off a trigger, I name the chopper say "Chopper" then do a "chopper in thislist" as the condition and the actual detonation calling in the activation.

Cake!

Join up on my FORT ROOSTER map and you can see it in action (Server 207.235.90.250 or look for "#1 ]KAW[ Fort Rooster" in the server list.

- satexas aka ]KAW[ Rooster (your old clannie!wink_o.gif

Thats the problem, I dont want to touch the editor. I want to have it all managed in my sqf script. Don't worry mate, I will keep battling away at it.

Share this post


Link to post
Share on other sites
@ lethal, is there any way to widen the base of the smoke billowing from the ground? I think it would be a cool smoke effect to simulate smoldering remains in city ruins but the base would need to look as if it were a fire originally.

Thanks.

yes, no problem at all. i can even throw in a few flames if you like. just give me some time and i can make a few effects for ya smile_o.gif

...and I'll give you credit for it in any missions I build that use the script.

Share this post


Link to post
Share on other sites

i'm getting a "script misc/signal.sqf cannot be found" error when i load the mission.

i've typed it in right in the initilization field for my squad leader.

help please.

Share this post


Link to post
Share on other sites
i'm getting a "script misc/signal.sqf cannot be found" error when i load the mission.

i've typed it in right in the initilization field for my squad leader.

help please.

Make sure you have "misc/signal.sqf" in your Mission folder and it's better to save and load the Mission after you added something new.

@HAILO

Well pretty nice script. wink_o.gif

But would it be possible to create a "HeliHEmpty" in the Script after you marked the Pickup location so Helis could be land more exactly.

Share this post


Link to post
Share on other sites
@HAILO

Well pretty nice script. wink_o.gif

But would it be possible to create a "HeliHEmpty" in the Script after you marked the Pickup location so Helis could be land more exactly.

Yea sure, I will try and include that on my next revision wink_o.gif

Share this post


Link to post
Share on other sites

Awesome!! notworthy.gif

I really take my hat off to you guys,

If i may ask how would one get the chopper to extract you once you have activiated the script?

Sorry i am a noobie to this

Share this post


Link to post
Share on other sites
i'm getting a "script misc/signal.sqf cannot be found" error when i load the mission.

i've typed it in right in the initilization field for my squad leader.

help please.

Make sure you have "misc/signal.sqf" in your Mission folder and it's better to save and load the Mission after you added something new.

@HAILO

Well pretty nice script. wink_o.gif

But would it be possible to create a "HeliHEmpty" in the Script after you marked the Pickup location so Helis could be land more exactly.

it's in there. any other ideas?

Share this post


Link to post
Share on other sites

Be sure the "misc" folder is in the mission folder with the "signal.sqf" file inside the "misc" folder. Then save and make the mission pbo again.

Share this post


Link to post
Share on other sites
Awesome!! notworthy.gif

I really take my hat off to you guys,

If i may ask how would one get the chopper to extract you once you have activiated the script?

Sorry i am a noobie to this

Currently this script runs local to the player and the server shows the smoke to other players due to the "createVehicle" not being local. This means the server sync's up the other clients to show the smoke shell.

I am currently working on getting this working with the enhanced smoke effect in MP, when I can I shall look into how this can be used with AI. The current intention for the script is MP to help human players.

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  

×