Page MenuHomeFeedback Tracker

Removeheadgear and Removegoggles Commands are Ignored on Civilian Units
New, WishlistPublic

Description

Civilian units spawn with random headgear and goggles, which cannot be removed.

Details

Legacy ID
2550072866
Severity
None
Resolution
Open
Reproducibility
Always
Category
Visual-Characters

Event Timeline

Bohemia edited Steps To Reproduce. (Show Details)Oct 13 2013, 9:55 AM
Bohemia edited Additional Information. (Show Details)
Bohemia set Category to Visual-Characters.
Bohemia set Reproducibility to Always.
Bohemia set Severity to None.
Bohemia set Resolution to Open.
Bohemia set Legacy ID to 2550072866.May 7 2016, 5:08 PM
Bohemia added a subscriber: AD2001.Oct 13 2013, 9:55 AM

Cannot confirm, it works fine here.

Bohemia added a subscriber: Bohemia.May 7 2016, 5:08 PM

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};

Thanks, works like a charm!