

Faron
-
Content Count
16 -
Joined
-
Last visited
-
Medals
Posts posted by Faron
-
-
6 hours ago, das attorney said:Ok well post up what you have tried so others can replicate/modify what you are doing. It's hard to work out what you are actually trying without seeing any code.
(Maybe you have done it right and there is bug in the game, or maybe you have a typo you do not realise. Who knows without seeing?)
You're right, I should actually know better... the non existant magical chrystal ball ;)
This is my CfgRemoteExec:
Spoiler#define F(NAME,TARGET) class NAME { \ allowedTargets = TARGET; \ }; #define ANYONE 0 #define CLIENT 1 #define SERVER 2 class CfgRemoteExec { class Functions { mode = 1; jip = 1; /* Client only functions */ F(life_fnc_jail,CLIENT) F(life_fnc_moveIn,CLIENT) F(life_fnc_restrain,CLIENT) F(life_fnc_robPerson,CLIENT) F(life_fnc_searchClient,CLIENT) F(TON_fnc_player_query,CLIENT) F(life_fnc_knockedOut,CLIENT) F(life_fnc_robReceive,CLIENT) F(life_fnc_tazeSound,CLIENT) F(life_fnc_copSiren,CLIENT) F(life_fnc_medicSiren,CLIENT) F(life_fnc_giveDiff,CLIENT) F(life_fnc_gangInvite,CLIENT) F(TON_fnc_clientGangKick,CLIENT) F(TON_fnc_clientGangLeader,CLIENT) F(TON_fnc_clientGangLeft,CLIENT) F(life_fnc_lightHouse,CLIENT) F(life_fnc_medicRequest,CLIENT) F(life_fnc_revived,CLIENT) F(life_fnc_receiveItem,CLIENT) F(life_fnc_receiveMoney,CLIENT) F(TON_fnc_clientGetKey,CLIENT) F(life_fnc_soundDevice,CLIENT) F(life_fnc_wireTransfer,CLIENT) F(life_fnc_pickupMoney,CLIENT) F(life_fnc_pickupItem,CLIENT) F(life_fnc_gangCreated,CLIENT) F(life_fnc_gangDisbanded,CLIENT) F(life_fnc_jailMe,CLIENT) F(SOCK_fnc_dataQuery,CLIENT) F(SOCK_fnc_insertPlayerInfo,CLIENT) F(SOCK_fnc_requestReceived,CLIENT) F(life_fnc_adminid,CLIENT) F(life_fnc_impoundMenu,CLIENT) F(life_fnc_garageRefund,CLIENT) F(life_fnc_addVehicle2Chain,CLIENT) F(life_fnc_vehicleAnimate,CLIENT) F(life_fnc_spikeStripEffect,CLIENT) F(life_fnc_bountyReceive,CLIENT) F(life_fnc_wantedList,CLIENT) F(life_fnc_removeLicenses,CLIENT) F(life_fnc_admininfo,CLIENT) F(TON_fnc_clientMessage,CLIENT) F(life_fnc_licenseCheck,CLIENT) F(life_fnc_licensesRead,CLIENT) F(life_fnc_copSearch,CLIENT) F(life_fnc_copLights,CLIENT) F(life_fnc_ticketPrompt,CLIENT) F(life_fnc_ticketPaid,CLIENT) F(life_fnc_freezePlayer,CLIENT) /* Server only functions */ F(bis_fnc_execvm,SERVER) F(life_fnc_wantedBounty,SERVER) F(TON_fnc_getID,SERVER) F(life_fnc_jailSys,SERVER) F(life_fnc_wantedRemove,SERVER) F(life_fnc_wantedAdd,SERVER) F(TON_fnc_insertGang,SERVER) F(TON_fnc_removeGang,SERVER) F(TON_fnc_updateGang,SERVER) F(TON_fnc_updateHouseTrunk,SERVER) F(TON_fnc_sellHouse,SERVER) F(TON_fnc_managesc,SERVER) F(TON_fnc_spikeStrip,SERVER) F(life_fnc_wantedCrimes,SERVER) F(life_fnc_wantedFetch,SERVER) F(life_fnc_wantedProfUpdate,SERVER) F(DB_fnc_queryRequest,SERVER) F(DB_fnc_insertRequest,SERVER) F(DB_fnc_updatePartial,SERVER) F(DB_fnc_updateRequest,SERVER) F(TON_fnc_chopShopSell,SERVER) F(TON_fnc_setObjVar,SERVER) F(TON_fnc_keyManagement,SERVER) F(TON_fnc_vehicleDelete,SERVER) F(TON_fnc_spawnVehicle,SERVER) F(TON_fnc_getVehicles,SERVER) F(TON_fnc_vehicleStore,SERVER) F(SPY_fnc_observe,SERVER) F(TON_fnc_pickupAction,SERVER) F(TON_fnc_cleanupRequest,SERVER) F(TON_fnc_updateHouseContainers,SERVER) F(SPY_fnc_cookieJar,SERVER) F(TON_fnc_vehicleCreate,SERVER) F(TON_fnc_addHouse,SERVER) F(TON_fnc_addContainer,SERVER) F(TON_fnc_sellHouseContainer,SERVER) F(TON_fnc_deleteDBContainer,SERVER) /* Functions for everyone */ F(life_fnc_broadcast,ANYONE) F(life_fnc_animSync,ANYONE) F(life_fnc_demoChargeTimer,ANYONE) F(life_fnc_corpse,ANYONE) F(life_fnc_colorVehicle,ANYONE) F(life_fnc_lockVehicle,ANYONE) F(life_fnc_flashbang,ANYONE) F(life_fnc_jumpFnc,ANYONE) F(SPY_fnc_notifyAdmins,ANYONE) F(life_fnc_setFuel,ANYONE) F(life_fnc_pulloutVeh,ANYONE) F(life_fnc_pushFunction,ANYONE) F(life_fnc_simDisable,ANYONE) F(bis_fnc_curatorrespawn,ANYONE) F(bis_fnc_effectkilledairdestruction,ANYONE) F(bis_fnc_effectkilledsecondaries,ANYONE) F(BIS_fnc_objectVar,ANYONE) F(bis_fnc_sharedobjectives,ANYONE) F(bis_fnc_playsound,ANYONE) F(bis_fnc_arsenal,ANYONE) F(bis_fnc_addstackedeventhandler,ANYONE) F(BIS_fnc_call,ANYONE) F(BIS_fnc_spawn,ANYONE) F(life_fnc_handlevehdamage,ANYONE) F(life_fnc_handlelocked,ANYONE) }; class Commands { mode = 1; jip = 1; F(setFuel,ANYONE) F(addWeapon,ANYONE) F(addMagazine,ANYONE) F(addPrimaryWeaponItem,ANYONE) F(addHandgunItem,ANYONE) F(hint,ANYONE) F(addeventhandler,ANYONE) }; };
And I added it to the config.cpp like this:
Spoilerclass DefaultEventhandlers; class CfgPatches { class life_server { units[] = {"C_man_1"}; weapons[] = {}; requiredAddons[] = {"A3_Data_F","A3_Soft_F","A3_Soft_F_Offroad_01","A3_Characters_F"}; fileName = "life_server.pbo"; author[]= {"Tonic"}; }; }; class Life_Server_Settings { class EXTDB { DatabaseName = "ArmaLife"; DebugMode = 1; }; }; class CfgFunctions { class BIS_Overwrite { tag = "BIS"; class MP { file = "\life_server\Functions\MP"; class initMultiplayer{}; class call{}; class spawn{}; class execFSM{}; class execVM{}; class execRemote{}; class addScore{}; class setRespawnDelay{}; class onPlayerConnected{}; class initPlayable{}; class missionTimeLeft{}; }; }; class MySQL_Database { tag = "DB"; class MySQL { file = "\life_server\Functions\MySQL"; class numberSafe {}; class mresArray {}; class queryRequest{}; class asyncCall{}; class insertRequest{}; class updateRequest{}; class mresToArray {}; class insertVehicle {}; class bool{}; class mresString {}; class updatePartial {}; }; }; class Life_System { tag = "life"; class Wanted_Sys { file = "\life_server\Functions\WantedSystem"; class wantedFetch {}; class wantedPerson {}; class wantedBounty {}; class wantedRemove {}; class wantedAdd {}; class wantedCrimes {}; class wantedProfUpdate {}; }; class Jail_Sys { file = "\life_server\Functions\Jail"; class jailSys {}; }; class Client_Code { file = "\life_server\Functions\Client"; }; }; class TON_System { tag = "TON"; class Systems { file = "\life_server\Functions\Systems"; class managesc {}; class cleanup {}; class huntingZone {}; class getID {}; class vehicleCreate {}; class vehicleDead {}; class spawnVehicle {}; class getVehicles {}; class vehicleStore {}; class vehicleDelete {}; class spikeStrip {}; class logIt {}; class federalUpdate {}; class chopShopSell {}; class clientDisconnect {}; class cleanupRequest {}; class setObjVar {}; class keyManagement {}; }; class Housing { file = "\life_server\Functions\Housing"; class addHouse {}; class addContainer {}; class fetchPlayerHouses {}; class initHouses {}; class sellHouse {}; class sellHouseContainer {}; class updateHouseContainers {}; class updateHouseTrunk {}; class houseCleanup {}; class deleteDBContainer {}; }; class Gangs { file = "\life_server\Functions\Gangs"; class insertGang {}; class queryPlayerGang {}; class removeGang {}; class updateGang {}; }; class Actions { file = "\life_server\Functions\Actions"; class pickupAction {}; }; }; }; class CfgVehicles { class Car_F; class CAManBase; class Civilian; class Civilian_F : Civilian { class EventHandlers; }; class C_man_1 : Civilian_F { class EventHandlers: EventHandlers { init = "(_this select 0) execVM ""\life_server\fix_headgear.sqf"""; }; }; }; #define F(NAME,TARGET) class NAME { \ allowedTargets = TARGET; \ }; #define ANYONE 0 #define CLIENT 1 #define SERVER 2 class CfgRemoteExec { class Functions { mode = 1; jip = 1; /* Client only functions */ F(life_fnc_jail,CLIENT) F(life_fnc_moveIn,CLIENT) F(life_fnc_restrain,CLIENT) F(life_fnc_robPerson,CLIENT) F(life_fnc_searchClient,CLIENT) F(TON_fnc_player_query,CLIENT) F(life_fnc_knockedOut,CLIENT) F(life_fnc_robReceive,CLIENT) F(life_fnc_tazeSound,CLIENT) F(life_fnc_copSiren,CLIENT) F(life_fnc_medicSiren,CLIENT) F(life_fnc_giveDiff,CLIENT) F(life_fnc_gangInvite,CLIENT) F(TON_fnc_clientGangKick,CLIENT) F(TON_fnc_clientGangLeader,CLIENT) F(TON_fnc_clientGangLeft,CLIENT) F(life_fnc_lightHouse,CLIENT) F(life_fnc_medicRequest,CLIENT) F(life_fnc_revived,CLIENT) F(life_fnc_receiveItem,CLIENT) F(life_fnc_receiveMoney,CLIENT) F(TON_fnc_clientGetKey,CLIENT) F(life_fnc_soundDevice,CLIENT) F(life_fnc_wireTransfer,CLIENT) F(life_fnc_pickupMoney,CLIENT) F(life_fnc_pickupItem,CLIENT) F(life_fnc_gangCreated,CLIENT) F(life_fnc_gangDisbanded,CLIENT) F(life_fnc_jailMe,CLIENT) F(SOCK_fnc_dataQuery,CLIENT) F(SOCK_fnc_insertPlayerInfo,CLIENT) F(SOCK_fnc_requestReceived,CLIENT) F(life_fnc_adminid,CLIENT) F(life_fnc_impoundMenu,CLIENT) F(life_fnc_garageRefund,CLIENT) F(life_fnc_addVehicle2Chain,CLIENT) F(life_fnc_vehicleAnimate,CLIENT) F(life_fnc_spikeStripEffect,CLIENT) F(life_fnc_bountyReceive,CLIENT) F(life_fnc_wantedList,CLIENT) F(life_fnc_removeLicenses,CLIENT) F(life_fnc_admininfo,CLIENT) F(TON_fnc_clientMessage,CLIENT) F(life_fnc_licenseCheck,CLIENT) F(life_fnc_licensesRead,CLIENT) F(life_fnc_copSearch,CLIENT) F(life_fnc_copLights,CLIENT) F(life_fnc_ticketPrompt,CLIENT) F(life_fnc_ticketPaid,CLIENT) F(life_fnc_freezePlayer,CLIENT) /* Server only functions */ F(bis_fnc_execvm,SERVER) F(life_fnc_wantedBounty,SERVER) F(TON_fnc_getID,SERVER) F(life_fnc_jailSys,SERVER) F(life_fnc_wantedRemove,SERVER) F(life_fnc_wantedAdd,SERVER) F(TON_fnc_insertGang,SERVER) F(TON_fnc_removeGang,SERVER) F(TON_fnc_updateGang,SERVER) F(TON_fnc_updateHouseTrunk,SERVER) F(TON_fnc_sellHouse,SERVER) F(TON_fnc_managesc,SERVER) F(TON_fnc_spikeStrip,SERVER) F(life_fnc_wantedCrimes,SERVER) F(life_fnc_wantedFetch,SERVER) F(life_fnc_wantedProfUpdate,SERVER) F(DB_fnc_queryRequest,SERVER) F(DB_fnc_insertRequest,SERVER) F(DB_fnc_updatePartial,SERVER) F(DB_fnc_updateRequest,SERVER) F(TON_fnc_chopShopSell,SERVER) F(TON_fnc_setObjVar,SERVER) F(TON_fnc_keyManagement,SERVER) F(TON_fnc_vehicleDelete,SERVER) F(TON_fnc_spawnVehicle,SERVER) F(TON_fnc_getVehicles,SERVER) F(TON_fnc_vehicleStore,SERVER) F(SPY_fnc_observe,SERVER) F(TON_fnc_pickupAction,SERVER) F(TON_fnc_cleanupRequest,SERVER) F(TON_fnc_updateHouseContainers,SERVER) F(SPY_fnc_cookieJar,SERVER) F(TON_fnc_vehicleCreate,SERVER) F(TON_fnc_addHouse,SERVER) F(TON_fnc_addContainer,SERVER) F(TON_fnc_sellHouseContainer,SERVER) F(TON_fnc_deleteDBContainer,SERVER) /* Functions for everyone */ F(life_fnc_broadcast,ANYONE) F(life_fnc_animSync,ANYONE) F(life_fnc_demoChargeTimer,ANYONE) F(life_fnc_corpse,ANYONE) F(life_fnc_colorVehicle,ANYONE) F(life_fnc_lockVehicle,ANYONE) F(life_fnc_flashbang,ANYONE) F(life_fnc_jumpFnc,ANYONE) F(SPY_fnc_notifyAdmins,ANYONE) F(life_fnc_setFuel,ANYONE) F(life_fnc_pulloutVeh,ANYONE) F(life_fnc_pushFunction,ANYONE) F(life_fnc_simDisable,ANYONE) F(bis_fnc_curatorrespawn,ANYONE) F(bis_fnc_effectkilledairdestruction,ANYONE) F(bis_fnc_effectkilledsecondaries,ANYONE) F(BIS_fnc_objectVar,ANYONE) F(bis_fnc_sharedobjectives,ANYONE) F(bis_fnc_playsound,ANYONE) F(bis_fnc_arsenal,ANYONE) F(bis_fnc_addstackedeventhandler,ANYONE) F(BIS_fnc_call,ANYONE) F(BIS_fnc_spawn,ANYONE) F(life_fnc_handlevehdamage,ANYONE) F(life_fnc_handlelocked,ANYONE) }; class Commands { mode = 1; jip = 1; F(setFuel,ANYONE) F(addWeapon,ANYONE) F(addMagazine,ANYONE) F(addPrimaryWeaponItem,ANYONE) F(addHandgunItem,ANYONE) F(hint,ANYONE) F(addeventhandler,ANYONE) }; };
Right before, I just uploaded it to the same folder as the config.cpp and added #include "CfgRemoteExec.hpp" in the end, but my server didn't start then...
The CfgRemoteExec is included in the description.ext right now in my mission folder, wich works fine.
description.ext :
Spoiler#include "infiSTAR_AdminMenu.hpp" //author = "Tonic"; loadScreen = "textures\armalife.jpg"; joinUnassigned = 1; respawn = BASE; respawndelay = 5; disabledAI = 1; disableChannels[]={0,1,2}; enableDebugConsole = 1; respawnDialog = 0; saving = 0; class Header { gameType = RPG; minPlayers = 1; maxPlayers = 121; }; wreckLimit = 3; wreckRemovalMinTime = 60; wreckRemovalMaxTime = 320; corpseLimit = 150; corpseRemovalMinTime = 999; corpseRemovalMaxTime = 9999; #include "Config_Spyglass.hpp" #include "CfgRemoteExec.hpp" #include "dialog\MasterHandler.hpp" #include "Config_Master.hpp" class RscTitles { #include "dialog\progress.hpp" #include "dialog\hud_nameTags.hpp" #include "dialog\hud_stats.hpp" }; class CfgFunctions { #include "Functions.hpp" }; class CfgSounds { sounds[] = {}; class SirenLong { name = "SirenLong"; sound[] = {"\sounds\Siren_Long.ogg", 1.0, 1}; titles[] = {}; }; class medicSiren { name = "medicSiren"; sound[] = {"\sounds\medic_siren.ogg", 1.0, 1}; titles[] = {}; }; class tazersound { name = "Tazersound"; sound[] = {"\sounds\tazer.ogg", 0.25, 1}; titles[] = {}; }; class flashbang { name = "flashbang"; sound[] = {"\sounds\flashbang.ogg", 1.0, 1}; titles[] = {}; }; class emp1 { name = "emp1"; sound[] = {"\sounds\sparkles_wreck_1.wss", 5.0, 1}; titles[] = {}; }; class emp2 { name = "emp2"; sound[] = {"\sounds\sparkles_wreck_2.wss", 3.0, 1}; titles[] = {}; }; class AGM_EarRinging_Heavy { name = "AGM_EarRinging_Heavy"; sound[] = {"\sounds\agm_earringing_heavy.wav", 1.0, 1}; titles[] = {}; }; class AGM_EarRinging_Medium { name = "AGM_EarRinging_Medium"; sound[] = {"\sounds\agm_earringing_medium.wav", 0.75, 1}; titles[] = {}; }; class AGM_EarRinging_Weak { name = "AGM_EarRinging_Weak"; sound[] = {"\sounds\agm_earringing_weak.wav", 0.5, 1}; titles[] = {}; }; }; class CfgDebriefing { class NotWhitelisted { title = "Einloggen Fehlgeschlagen"; subtitle = "Du bist auf diesem Slot nicht gewhite-listed"; description = "Du darfst diesen Slot nicht benutzen, da du nicht die vorrausgesetzten Berechtigungen hast. Versuche es auf einem anderen Slot."; pictureBackground = ""; picture = ""; pictureColor[] = {0,0.3,0.6,1}; }; class Blacklisted { title = "Einloggen Fehlgeschlagen"; subtitle = "Du bist als Polizist geblack-listed"; description = "Aufgrund vorhergegangener Aktionen, hat dich ein Admin für die Polizeifraktion gesperrt."; pictureBackground = ""; picture = ""; pictureColor[] = {0,0.3,0.6,1}; }; class KickedForEnteringGovZone { title = "Du wurdest gekickt!"; subtitle = "Du wurdest gekickt, da du dich länger als 10 Sekunden in die Regierungszone begeben hast."; description = "Rebellen dürfen die Regierungszone nicht betreten. Nachdem der 10-Sekunden Countdown abgelaufen ist, werden sie deshalb in die Lobby gekickt."; pictureBackground = ""; picture = ""; pictureColor[] = {0,0.3,0.6,1}; }; class SpyGlass { title = "The SpyGlass sees you"; subTitle = "You were detected by the SpyGlass"; description = "You were detected for cheating and have been reported to the server. Enjoy your day."; pictureBackground = ""; picture = ""; pictureColor[] = {0,0.3,0.6,1}; }; }; class CfgNotifications { class MedicalRequestEmerg { title = "Arzt angefordert"; iconPicture = "\A3\ui_f\data\map\mapcontrol\taskIcon_ca.paa"; description = "%1"; duration = 5; priority = 7; }; class DeliveryAssigned { title = "Lieferauftrag angenommen"; iconPicture = "\A3\ui_f\data\map\mapcontrol\taskIcon_ca.paa"; description = "%1"; duration = 10; priority = 7; }; class DeliveryFailed { title = "Lieferauftrag fehlgeschlagen"; iconPicture = "\A3\ui_f\data\map\mapcontrol\taskiconfailed_ca.paa"; description = "%1"; duration = 7; priority = 7; }; class DeliverySucceeded { title = "Lieferauftrag erfolgreich"; iconPicture = "\A3\ui_f\data\map\mapcontrol\taskIcondone_ca.paa"; description = "%1"; duration = 6; priority = 6; }; class TextMessage { title = "Textnachricht erhalten"; iconPicture = "icons\messagenew.paa"; description = "%1"; duration = 10; priority = 6; }; class PoliceDispatch { title = "Notrufzentrale"; iconPicture = "icons\messagepolice.paa"; description = "%1"; duration = 10; priority = 6; }; class AdminDispatch { title = "Admin Notruf"; iconPicture = "icons\messageadmin.paa"; description = "%1"; duration = 10; priority = 6; }; class AdminMessage { title = "Admin Nachricht"; iconPicture = "icons\messageadmin.paa"; description = "%1"; duration = 10; priority = 5; }; class OpforMessage { title = "Rebellen Notruf"; iconPicture = "icons\messagenew.paa"; description = "%1"; duration = 10; priority = 5; }; };
If you need anything else just give me a wink ;)
-
55 minutes ago, das attorney said:Have you tried it yourself?
Yes, but it won't start by symply including it in the config.cpp via #include and writing the whole script inside doesn't have any effect as well. Maybe I'm just doing it wrong...
@bad benson Your suggestion does also unfortunely not show any success...
-
2 hours ago, bad benson said:for remoteExec there is a CfgRemoteExec that defines which functions are allowed to be broadcasted. o personally don't do stuff with it because i play mostly with friends so security is not a concern but since you are working with a given mod that is made for public serve (i'm guessing), this might be your issue.
i'm not sure if this will bypass that but try it more generic like this
[_vehilce, { _this addEventHandler ["HitPart", { [_this, { _this call your_fnc_function; }] remoteExec ["call", 0, false]; }]; }] remoteExec ["call", 0, true];
i don't know if "call" is blocked by default too. but try it like this just for testing.
or of course do proper whitelisting in CfgRemoteExec
Could adding another CfgRemoteExec solve the problem as well?
-
@Jawshy I'm not trying to bother you, but you probably know more about how the life_server works. I added the following to the life_server/functions/systems/fn_vehicleCreate
[_vehicle, ["HitPart", {_this remoteExec ["life_fnc_handleVehDamage", 0, true]}]] remoteExec ["addEventHandler", 0, true];
This isn't being executed (the EH doesn't trigger) and I can't see a reason why, as there are no errors messages showing up. Any ideas/suggestions?
-
3 minutes ago, haleks said:Hard to say without seeing the script, but what's wrong with running it from the mission?
It's working completely fine from the mission. But to apply the EH to all vehicles I also have to add it to the spawn script for unparking vehicles, wich is located in the life_server addon.
-
-
@haleks @davidoss @bad benson So a little update:
[_vehicle, ["HitPart", {_this remoteExec ["life_fnc_handleVehDamage", 0, true]}]] remoteExec ["addEventHandler", 0, true];
This code works fine as long as it's local, but I didn't test it with another guy yet. I also tried to apply this in my @life_server when a vehicle spawns (from the altis life framework), but this doesn't work. So it seems like remote execution still doesn't work completely as it should, but I'll test it and update this post when I know more!
EDIT: Code works global if the spawning vehicle function is executed in the mission file, but doesn't work at all if written in the script in life server that spawns the vehicle. I'm really confused...
-
1
-
-
BLAME ON MY FUZZY HEAD!!! Jip was disabled...
-
6 hours ago, haleks said:That's not how I understand the wiki description : the shooter has to be local, in other words the addEventHandler must have been run on his machine.
So you do need to remoteExec the EH addition on all clients - but yeah now that I think of it, the function called by the EH might need to be broadcasted too, depends on what it actually does I guess...
I'd think that it would be enough to broadcast the EH on all clients as it's triggered to ALL clients when the vehicle is being hit. So broadcasting the function would trigger it twice.
-
55 minutes ago, haleks said:I'm probably a bit fuzzy since I didn't get any sleep today, but the example I posted above should take care of that : it broadcasts the EH to all machines, so you don't really need to worry about locality - the EH will fire on the shooter's machine and trigger your global function.
Did you actually try it?
I just wanted to copy paste but your post is gone...
EDIT: Ah no I just found it.... I'm a bit fuzzy as well ;)
I'll just be able to try it later.
-
Might this cause the problem?
While you can add "HitPart" handler to a remote unit, the respectful addEventHandler command must be executed on the shooter's PC and will only fire on shooter's PC as well. The event will not fire if the shooter is not local, even if the target itself is local. Additionally, if the unit gets damaged by any means other than shooter's shooting, "HitPart" will not fire.
Because that's actually what I wanted to work around...
-
13 hours ago, davidoss said:Not function , its executions only..
Or i am understanding this wrong..
The function is meeting all criteria, as it only param is _vehicle wich is being created right before. The function is whitelisted and JIP is on. And it does exist in all clients mission folder.
@haleks I'll give it a try, but is it even possible to hand the arguments to the eventhandler right in front of the addEventHandler? Or does remoteExec allow this?
-
Dear Community,
I'm trying to trigger an effect for a vehicle when it's hit by a flare (kind of a superman EMP flare). The only function that triggers when a vehicle is hit by a flare is the "HitPart" eventhandler. Unfortunely this only works local, but I'd really like the engine to break for every client! I already tried adding the following lines in the function that spawns the vehicle:
[[_vehicle, {_this addEventHandler ["HitPart", {_this call life_fnc_handleVehDamage}]}], "BIS_fnc_spawn", true, true] spawn BIS_fnc_MP;
[[_vehicle, {_this addEventHandler ["HitPart", {_this call life_fnc_handleVehDamage}]}], "BIS_fnc_call", true, true] call BIS_fnc_MP;
Created a file that adds the eventhandler:
[[_vehicle], "life_fnc_addVehEH", true, true, false] call BIS_fnc_MP;
[_vehicle] remoteExec ["life_fnc_addVehEH", 0, true];
Neither client log nor server log are showing any errors.
None of these does work...
Do you have any suggestions or see any mistakes? I'd appreciate it!
Cheers,
Faron
-
1
-
-
Dear Community and helpful happy helpers,
while I was scripting around a bit, I experienced the very uneven case (sarcasm!) that something simply didn't work.
Today it's a loop:
Quote_markerCount = (count allMapMarkers) - 1; hint format ["The total marker amount is %1", _markerCount]; _i = 0; while {( _i <= _markerCount )} do { if (isNil "_i") then {_i = 0}; _currentMarker = allMapMarkers select _i; _treasureDistance = _treasure distance2D _currentMarker; /*if (_treasureDistance <= 200) then { if (markerType _currentMarker == "respawn_naval")) then { _marker = _currentMarker; } else { if ((markerShape _currentMarker == "ELLIPSE") && (markerBrush _currentMarker == "DiagGrid")) then { _area = _currentMarker; }; }; };*/ _i = _i + 1; };
As you can see, I even commented the core part out. _markerCount is around 500. As far as I know, a while loop is limited to 10 000 iterations, so I don't get why this one isn't executed? Might this depend on the servers capacity?
I appreciate every suggestion!
Greetz,
Faron
-
The 10 Rnd M107 Mag is actually filled with 41 rounds. This is obviously a bug, so I just wanted you to know.
Regards,
Faron
[SOLVED] Make local EventHandler global
in ARMA 3 - MISSION EDITING & SCRIPTING
Posted
I obviously didn't add it right, as it simply worked after I tried a couple of days later. It's probably just been added to the wrong file. I guess adding the CfgRemoteExec made the difference!