Page MenuHomeFeedback Tracker

init EVH does not fire on createVehicle
New, WishlistPublic

Description

https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#Init

The init Event Handler which can only be called from within a mod fails to fire when a vehicle is create using createVehicle either locally or remotely as the wiki claims it should. It does however fire when objects are loaded at mission start.

Details

Legacy ID
3545791604
Severity
None
Resolution
Open
Reproducibility
Always
Category
Engine
Steps To Reproduce

Create a simple mod with the following in the config.cpp

class CfgPatches
{
class server_mod
{

		units[] = {};
		weapons[] = {};
		requiredAddons[] = { "A3_Data_F", "A3_Soft_F", "A3_Soft_F_Offroad_01", "A3_Characters_F" };
		fileName = "server_mod.pbo";
		author[] = { "Jaffa" };

};
};

class CfgVehicles
{
class Land;
class LandVehicle : Land {

		class EventHandlers;

};
class Car : LandVehicle {

		class EventHandlers : EventHandlers {
			init = "diag_log format['Init called for %1 (%2)',_this select 0,typeOf (_this select 0)]";
		};

};
class Tank : LandVehicle {

		class EventHandlers : EventHandlers {
			init = "diag_log format['Init called for %1 (%2)',_this select 0,typeOf (_this select 0)]";
		};

};

class All;
class AllVehicles : All {

		class EventHandlers;

};
class Ship : AllVehicles {

		class EventHandlers : EventHandlers {
			init = "diag_log format['Init called for %1 (%2)',_this select 0,typeOf (_this select 0)]";
		};

};
class Air : AllVehicles {

		class EventHandlers : EventHandlers {
			init = "diag_log format['Init called for %1 (%2)',_this select 0,typeOf (_this select 0)]";
		};

};
}; class AllVehicles : All {

		class EventHandlers;

};
class Ship : AllVehicles {

		class EventHandlers : EventHandlers {
			init = "_this spawn AGAL_fnc_clearVehicleAmmo";
		};

};
class Air : AllVehicles {

		class EventHandlers : EventHandlers {
			init = "_this spawn AGAL_fnc_clearVehicleAmmo";
		};

};
};

Event Timeline

Jaffa edited Steps To Reproduce. (Show Details)Sep 11 2015, 7:54 PM
Jaffa set Category to Engine.
Jaffa set Reproducibility to Always.
Jaffa set Severity to None.
Jaffa set Resolution to Open.
Jaffa set Legacy ID to 3545791604.May 8 2016, 12:42 PM
Jaffa added a subscriber: Jaffa.Jun 1 2016, 3:52 PM