Bug Closed · Resolved High priority

Mobvariables are shared accross mobs of the same type.

#10193 opened by mikekevie 8 hours ago

mikekeviereported this bug

When mobs have created variables via the Variables field and you change the value of that variable via, for example varadd, all spawned mobs with this variable receive the change.

Steps to reproduce: Load in the config below spawn 2 or more KeyMapTestMob interact with 1 of em, and observe all the names changing.

KeyMapTestMob:
  Type: Sheep
  AIGoalSelectors:
    - clear
  Variables:
    PuzzleConditionalMap: map/ExampleA=true;
  Skills:
    - varAdd{name=caster.PuzzleConditionalMap;value='this=that'} @self ~onInteract  
    - setname{name=<caster.var.PuzzleConditionalMap>} @self ~onTimer:5
Sign in to join the discussion.