View Single Post
Violet CLM Violet CLM's Avatar

JCF Éminence Grise

Joined: Mar 2001

Posts: 10,978

Violet CLM has disabled reputation

Aug 16, 2017, 09:01 AM
Violet CLM is offline
Reply With Quote
Three thoughts...
  • The very first time you call bee.behave(BEHAVIOR::BEE);, the state will stop being STATE::START, so jjAddObject won't get called. Move the behave line farther down.
  • int freeze; is a variable local to (and therefore reinitialized) each time the function is called, not a member property of an object that would persist over time. Replace freeze with bee.special or something like that.
  • While creating the gem ring, you might need to set its jjOBJ::deactivates to false so it doesn't go missing in the time between its being created and its starting to follow the bee around. (And then bee.state == STATE::KILL should be expanded to check for STATE::DEACTIVATE too.)
__________________