Page MenuHomeFeedback Tracker

Eventhandlers not working for NonAiVehicles
New, NormalPublic

Description

Eventhandlers called from CfgNonAiVehicles are not working.

For example

A3_Animals_F -> config.cpp -> CfgNonAiVehicles -> ButterFly_random

has an init eventhandler

class EventHandlers
{
	init="(_this select 0) call bis_fnc_animalRandomization;";
};

that doesn't seem to do anything. There's four textures in a3/animals_f/data and this code in a3/functions_f/ambient/fn_animalrandomization.sqf

/*---------------------------------------------------------------------------
	class ButterFly_random: Insect
---------------------------------------------------------------------------*/
if (_this isKindOf "ButterFly_random") exitWith
{
	_textureList =
	[
		"\A3\Animals_F\Data\Butterfly_Pasha_co.paa",
		"\A3\Animals_F\Data\Butterfly_Swallow_co.paa",
		"\A3\Animals_F\Data\Butterfly_Tortoise_co.paa",
		"\A3\Animals_F\Data\Butterfly_White_co.paa"
	];
	_this setObjectTextureGlobal [0, (_textureList call BIS_fnc_selectRandom)];
};

So for now it seems that animal randomization is only working for animals defined as cfgvehicles. E.g. same EH in

animals_f_beta -> sheep -> config.cpp -> CfgVehicles

is working correctly

Details

Severity
None
Resolution
Open
Reproducibility
Always
Operating System
Windows 7 x64
Category
General
Steps To Reproduce
  1. create some butterflies _null = "Butterfly_Random" createVehicle position player;
  2. they all look the same

Additional Information

main branch, version 1.72, vanilla

Event Timeline

kno created this task.Jul 9 2017, 2:27 AM
kno edited Steps To Reproduce. (Show Details)Jul 9 2017, 2:29 AM
kno edited Steps To Reproduce. (Show Details)Jul 9 2017, 8:05 AM
kno edited Additional Information. (Show Details)
kno changed Operating System from Windows 7 to Windows 7 x64.
kno updated the task description. (Show Details)Jul 9 2017, 8:18 AM