Excluding specific corpses (dead units) from garbage collector.

  1. 11 months ago

    Hello, I'm making a mission where my group is looking for a missing patrol, now, I want this patrol to be found dead, but right now the garbage collector cleans away these dead bodies before we can reach them. (I'm giving the units zero health at startup). It's important that they start off as dead since there are scripts depending on blufor being present/not present in their area. I tried adding "this setvariable ["ALiVE_SYS_GC_IGNORE",true]" in their init line but they still seem to despawn, probably because they are dead units and not objects? Anyone know of any workaround here? :)

  2. The wiki states for that exlcusion:

    "add classnames of any additional non-unit and non-vehicle objects to exclude from GC"

    so I'm assuming it just won't work on dead AI. You could work around this by having something nearby that keeps them there.. say an invisible UAV (which ALiVE treats as a player)... although this might mess with your scripts that depend on unit presence.

  3. Doesn't sound like it's an issue, but if the units aren't created on the server and you set the variable not to be broadcasted it will only have local effect, hence the server would return false when checking the var.

    Just for good measure, try setting the var with the broadcast flag: <object> setVariable ["ALiVE_SYS_GC_IGNORE", true, true] to see if it makes any differance.


or Sign Up to reply!