clarification on scavengersActive()

For AI and campaign script related discussions and questions
Post Reply
User avatar
Code contributor
Code contributor
Posts: 347
Joined: 08 Apr 2009, 15:15
Location: Germany

clarification on scavengersActive()

Post by DylanDog » 30 Apr 2010, 14:49

how does this function work? I thought it would have been related to the fact if the scavengers have been activated or not before the game starts. Actually I play a game with scavengers, at the beginning this function returns true (1) but during the game it returns false (0) even if few scavenger units and structures are live ? On the attached file you can see few scavenger units (a scav factory is also live) and few debug messages whose output states that scavengersActive() == 0
My Warzone 2100 mods:
Download DyDo-AI for Warzone skirmish/multiplayer games.
Download A2C-HM (Alpha 2 Campaign - Hard Mode).
Download A3C-HM (Alpha 3 Campaign - Hard Mode).

Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3753
Joined: 03 Aug 2006, 19:39

Re: clarification on scavengersActive()

Post by Per » 30 Apr 2010, 15:47

It checks if scavengers are turned on in the MP dialog. Scav scripts are started independently of this value, so if the scav scripts do not check this value and turn themselves off, it can certainly happen that scavs are running but scavengersActive() is false. It should perhaps be understood as shouldScavengersBeActive(). If it changes value during a game, that would certainly be a bug.

Post Reply