Civilian units spawn with random headgear and goggles, which cannot be removed.
Description
Details
- Legacy ID
- 2550072866
- Severity
- None
- Resolution
- Open
- Reproducibility
- Always
- Category
- Visual-Characters
Event Timeline
Really? Removeheadgear this; removegoggles this; don't work. Did you try several times Killzone? Because I've found that sometimes they spawn with headgear / goggles and sometimes they don't.
This is probably because headgear and goggles are added by randomiser script after you removed them. Commands work.
Ah okay, cool. So I can just remove them with a trigger or something? Or something that removes them AFTER the randomiser script? Interesting, thanks Killzone.
I was taking a guess when I said randomiser script, happens to be true:
class EventHandlers: EventHandlers
{ init = "(_this select 0) execVM ""\A3\characters_f\civil\scripts\randomize_civ1.sqf"""; };
^^^ from c_man_1 class
I wonder if changing execVM to call compile preprocessfilenimbers would have sorted the problem. Going to consult Moricky on this one :)
You can stick your goggles removing routine in a function with postInit = 1 or call it from init.sqf for now.
Can't you just use something like "sleep 1" to let the randomizer do it's work and then use the "removeHeadgear unitName" and "removeGoggles unitName"?
You cannot have straight script suspension in init. You can spawn it though from init.
So, I could have a "removeStuff.sqf" with:"sleep 1; removeHeadgear player; removeGoggles player;" and in the init have "execVM "removeStuff.sqf;"?
Sorry for the stupid questions, I'm new to scripting.
yeah you can execVM the script or you can just put this in init
0 = this spawn {sleep 1; removeHeadgear _this; removeGoggles _this};
This issue needs to be fixed rather sooner than later, looks quite popular: http://forums.bistudio.com/showthread.php?167146-I-script-a-specific-hat-on-an-AI-and-it-changes-to-a-random-hat-when-I-test