Jump to content

Recommended Posts

I am pleased to announce my first script release.

 

GRAD Fireworks

 

What it does

Shoots rockets in the air.

 

Takes input:

  • Position
  • Color (Random, Red, Green, Blue, White)
  • Type (Random, Fizzer, Normal, Rain)

Rain is always white.

 

Sample Call (you can call from any client or server)

[getPos objectname, 'normal','red'] remoteExec ["GRAD_fireworks_fnc_prepareFireworks", 2];

Installation

 

  1. Copy GRAD_fireworks to your mission directory
  2. Put code below in description.ext
  3. Call the script via trigger, radio, script, whatever. Sample call above.
class cfgFunctions
{
  #include "GRAD_fireworks\cfgFunctions.hpp"
};

class cfgSounds
{
  #include "GRAD_fireworks\cfgSounds.hpp"
};

How it works

Uses Flares, Lightpoints and some sounds to achieve the effect. Therefore totally vanilla compatible. Computation is done on the server which then sends precalculated stuff to the clients. Those display the effects locally, but it should look the same on every computer.

 

In usage example here:

 

 

 

 

 

Download Script + Sample Mission

http://www.armaholic.com/page.php?id=29255

 

Feedback welcome

If you have any suggestions codewise or effectwise, let me know.

  • Like 7

Share this post


Link to post
Share on other sites

Wow that's really cool. A question I have is there a way to convert this into some kind of flare script. One that burns more bright like normal flares vs arma flares for cool night ops. Seems like most the work is done already just needing more of a single flare that gives off more light for longer time period.

Share this post


Link to post
Share on other sites

Wow that's really cool. A question I have is there a way to convert this into some kind of flare script. One that burns more bright like normal flares vs arma flares for cool night ops. Seems like most the work is done already just needing more of a single flare that gives off more light for longer time period.

 

Afaik ACE3 already does that.

 

You need to change the config for the flares to achieve that. You could indeed attach another lightpoint to the flare with some eventhandler stuff to brighten things up, but that would be really hacky. So not possible in a good way with scripting.

 

Note that I didnt use *those* kind of flares anyway, but flares from planes/helicopters, not the one to brighten the sky at night.

Share this post


Link to post
Share on other sites

"error zero divisor"

sorry, thats a little bit too little information to debug.

 

quite possibly you didnt fill all required parameters or sth. do you have an rpt file you could provide? should be under C:\Users\<username>\AppData\Local\Arma 3

Share this post


Link to post
Share on other sites
my mistake. I tried to use markers instead of objects. Doesnt work with markers :p . 

Share this post


Link to post
Share on other sites

 

my mistake. I tried to use markers instead of objects. Doesnt work with markers :P . 

 

 

yeah, actually its totally possible.

 

marker positions are different from normal positions, so you have to switch getPos with getMarkerPos like that:

[[getPos objectname, 'normal','red'],"callFireworks",true,true] spawn BIS_fnc_MP;

to

[[getMarkerPos 'markername', 'normal','red'],"callFireworks",true,true] spawn BIS_fnc_MP;

Attention to the markername, its always a string, so begins and ends with " if you want to address it in SQF.

 

 

Edit: For explanation: Markers only have X and Y position whereas positions have X,Y and Z. As the rocket always spawns at zero Z, the script is capable of accepting markerPositions, if called correctly  :)

Edited by nomisum

Share this post


Link to post
Share on other sites

Doink! :p sorry. youre right. completely forgot you use getmarkerpos for markers. nyaaaaaaah.

Share this post


Link to post
Share on other sites

Hey,

the video's look really nice.

 

is the file still available?

 

thank you :)

Share this post


Link to post
Share on other sites

Hey,

the video's look really nice.

 

is the file still available?

 

thank you :)

 

Yeah sorry, the file was deleted by the filehoster it seems. I updated with the link with the armaholic one.

  • Like 1

Share this post


Link to post
Share on other sites

I updated my script (as it apparently was broken, thanks for the heads up @M1ke_SK !).

 

You can download the updated demo mission here: https://uploadfiles.io/fuiw9

 

I will update the instructions in a minute too.

 

Changelog:

* added params

* added remoteexec

* added cfgFunctions/cfgSounds for easy include

* code cleanups/restructuring

* made sounds to be heard from far away (up to 1000m for blasts)

* upped sound volume, which was the most obvious bug

Share this post


Link to post
Share on other sites

Just saw this for the first time.  Those fireworks effects are OUTSTANDING!   Thanks man!

  • Like 1

Share this post


Link to post
Share on other sites

This looks really awesome! Good job!

 

This will be fun to incorporate into missions. 

 

Fire

Share this post


Link to post
Share on other sites

@nomisum great job. I am seeing the rockets lift off and then explode but only the red color. Nothing like your video. Errors are:

Spoiler

 2:16:46   Error Undefined variable in expression: _firing_position
 2:16:46 File GRAD_fireworks\functions\server\fn_prepareFireworks.sqf [GRAD_fireworks_fnc_prepareFireworks], line 183
 2:16:46 Error in expression <CMflare_Chaff_Ammo" createVehicleLocal [_firing_position select 0,_firing_positi>
 2:16:46   Error position: <_firing_position select 0,_firing_positi>
 2:16:46   Error Undefined variable in expression: _firing_position
 2:16:46 File GRAD_fireworks\functions\client\fn_spawnFireworks.sqf [GRAD_fireworks_fnc_spawnFireworks], line 24
 2:16:51 Error in expression <rand_subexpl_power3/8]];
};
};

};

[
_firing_position,
_type,
_initial_veloci>
 2:16:51   Error position: <_firing_position,
_type,
_initial_veloci>
 2:16:51   Error Undefined variable in expression: _firing_position
 2:16:51 File GRAD_fireworks\functions\server\fn_prepareFireworks.sqf [GRAD_fireworks_fnc_prepareFireworks], line 183
 2:16:51 Error in expression <CMflare_Chaff_Ammo" createVehicleLocal [_firing_position select 0,_firing_positi>
 2:16:51   Error position: <_firing_position select 0,_firing_positi>
 2:16:51   Error Undefined variable in expression: _firing_position
 2:16:51 File GRAD_fireworks\functions\client\fn_spawnFireworks.sqf [GRAD_fireworks_fnc_spawnFireworks], line 24

 

 

The one thing I am really noticing is that there is some kind of call in the init.sqf you upload I do not see the fireworks.sqf nor the callFireworks.sqf files in the Zip folder. Were they missing for a reason? 

Spoiler

callFireworks = compile preprocessFileLineNumbers "GRAD_fireworks\callFireworks.sqf";
_nul = [] execVM "GRAD_fireworks\fireworks.sqf";

 

So this i how I have it thus far. 

Next in the infostand object(named firebase) in Eden I have 

 

Spoiler

firebase addAction["<t color=""#93E352"">Shoot random with red color ",{
    [getPos (selectRandom startpositions), 'normal','red'] remoteExec ["GRAD_fireworks_fnc_prepareFireworks", 2];
}, nil, 1, false, false, "","_target distance _this < 1.5"];

 

The boats are in the water running around and I see the rockets stream up, hear the sounds and see just red explosions followed by the flares:

 

Looks nothing like your videos. 

 

 

Share this post


Link to post
Share on other sites

Yeah, some update might have broken something.

 

There is a refactored version on my desk already, I will try to upload the fix somewhen this week. Sorry for the inconvenience.

Share this post


Link to post
Share on other sites

AWW.. Today is the 4th for us yankees and we shoot off a shit load of fireworks.. Was hoping to push this to the server today. But understandable you got realife thing to do.

Share this post


Link to post
Share on other sites

@falcon911 please take this fixed/rewritten version 1.2

 

@foxhound could you remove the installation/code instructions from armaholic? they are not up to date anymore (in this thread OP they are). you might also exchange the uploaded 1.1 with attached 1.2. thanks!

 

https://we.tl/pX9OAcv3jy

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

×