addEventhandler for dayz?

Story is about dropping bombs that will illuminate large area on impact by spawning a lot of flare/smoke projectiles so it's not only visual effect.
 
I tried to add this trough extended eventhandlers, but it was too complicated... I have no more ideas.
 
ok just tested it with the original napalm Script:
Tested the example mission: Everything works fine!
Tested it on DayZ 1.8.0.3 AN2 2Rnd_FAB_250:
Bombs explode and the Napalm is spawning in mid air :D
Cant tell whats wrong there but its actually working ^^
 
i added it through the mission.sqm
I can try it with a spawn Script and see what i can get there =)

EDIT:
Just Tested it with bluephonix Admin Tool:
Spawned in an AN2 with this sqf
Code:
_spawn = "AN2_DZ";
_posplr = [((getPos player) select 0) + 5, ((getPos player) select 1) + 5, 0];
_dirplr = getDir player;
_spwnveh = _spawn createVehicle (_posplr);
_spwnveh setVariable ["Sarge",1,true];
_spwnveh addweapon "HeliBombLauncher";
_spwnveh addmagazine "2Rnd_FAB_250";
_spwnveh addmagazine "2Rnd_FAB_250";
_spwnveh addEventHandler ["fired", {_this execVM "Scripts\napalm.sqf"}];

Same Effect, the Napalm appears about 300m in mid air.
Dont know if this helping you out ^^
 
Last edited:
Same Effect, the Napalm appears about 300m in mid air.

I have Epoch server so it's not a problem...

Any ideas why

_object addEventHandler ["fired", {_this execVM "napalm.sqf"}];

may be not working in server_monitor?
 
ok since i am not able to bring over a script from server.pbo to the client, we need to make some tricks ^^
so if you have all of your planes with napalm why dont give them the eventhandler not while looking at it?

Pu this in your fn_selfactions where the curstortarget part is
Code:
    _isAN2 = _cursorTarget isKindOf "AN2_DZ";
 
    if(_isAN2 && _isAlive) then {
    _cursorTarget addEventHandler ["fired", {_this execVM "Scripts\napalm.sqf"}];
    };

This way you get all of them with Napalm Bombs. I tested it on Epoch, BUT Same result: Napalm in mid air.
But at least its working now ^^
If you just want some of the planes with the Script you will have to set a new variable and check for it ;)
The Rest is up to you i think :D
 
Hmm... It seems I dont get when CursorTarget section starts... I have added this code below

_isMan = cursorTarget isKindOf "Man";

... nothing happened?
 
Search for this:
Code:
    _isTent = _cursorTarget isKindOf "TentStorage";
   
    _isAlive = alive _cursorTarget;
   
    _text = getText (configFile >> "CfgVehicles" >> _typeOfCursorTarget >> "displayName");

And add it after that

Your planes have bombs?
 
sure it causes lag, since its executing the script everytime your fire.
This means, the Script is working, maybe you should try to look around you if you drop the bomb and see the napalm is spawning around you.
 
Back
Top