Stencyl 3.4.0 is now out. Get it now!

Is there a max. number of Behaviors for each Actor?

SkeyeCommander

  • Posts: 4
Hello,

i have an actor called Player with 4 Behaviors in it.
When i create a new one (any name) and add him to this Actor, on of the other Behaviors react weird to it.
The last 4 bricks of the code (who are changing attributes of other Behaviors called "Mean Actor group tracker" and "mean melee Attack") in the attached screenshot stopped working, their excuse for this reaction is:

(output from the log viewer)
jar:file:/Volumes/Stencyl-full/Stencyl/sw.jar!/res/logview4j/images/info.gif   false   INFO   1505039566713002859   stencyl.sw.app.filewatcher.ExternalAppLauncher   [Flash] com.stencyl.behavior.BehaviorManager#setAttribute(170): Warning: Behavior does not exist - Mean Melee Attack
jar:file:/Volumes/Stencyl-full/Stencyl/sw.jar!/res/logview4j/images/info.gif   false   INFO   1505039566713002858   stencyl.sw.app.filewatcher.ExternalAppLauncher   [Flash] com.stencyl.behavior.BehaviorManager#setAttribute(170): Warning: Behavior does not exist - Mean Actor Group Tracker
jar:file:/Volumes/Stencyl-full/Stencyl/sw.jar!/res/logview4j/images/info.gif   false   INFO   1505039566713002857   stencyl.sw.app.filewatcher.ExternalAppLauncher   [Flash] com.stencyl.behavior.BehaviorManager#getAttribute(135): Warning: Behavior does not exist - Mean Actor Group Tracker
jar:file:/Volumes/Stencyl-full/Stencyl/sw.jar!/res/logview4j/images/info.gif   false   INFO   1505039566713002856   stencyl.sw.app.filewatcher.ExternalAppLauncher   [Flash] com.stencyl.behavior.BehaviorManager#setAttribute(170): Warning: Behavior does not exist - Mean Melee Attack
jar:file:/Volumes/Stencyl-full/Stencyl/sw.jar!/res/logview4j/images/info.gif   false   INFO   1505039566713002855   stencyl.sw.app.filewatcher.ExternalAppLauncher   [Flash] com.stencyl.behavior.BehaviorManager#getAttribute(135): Warning: Behavior does not exist - Mean Melee Attack
jar:file:/Volumes/Stencyl-full/Stencyl/sw.jar!/res/logview4j/images/info.gif   false   INFO   1505039566713002854   stencyl.sw.app.filewatcher.ExternalAppLauncher   [Flash] com.stencyl.behavior.BehaviorManager#setAttribute(170): Warning: Behavior does not exist - Mean Melee Attack
jar:file:/Volumes/Stencyl-full/Stencyl/sw.jar!/res/logview4j/images/info.gif   false   INFO   1505039566713002853   stencyl.sw.app.filewatcher.ExternalAppLauncher   [Flash] com.stencyl.behavior.BehaviorManager#getAttribute(135): Warning: Behavior does not exist - Mean Melee Attack

but they actually are attached to this actor and they have as well all the attributes!
When i remove the newly created Behavior, everithing is fine.
Is there a limitation for attached Behaviors per Actor?
I thank you so much if you can help me!
(Sorry for my bad English)

« Last Edit: September 10, 2017, 03:34:11 am by SkeyeCommander »

TheIndieStation

  • *
  • Posts: 2182
Put those 4 red blocks inside a do after wrapper with a delay of 0.1 seconds, and you are good to go!

SkeyeCommander

  • Posts: 4
Thank you so much! it actually worked!
One Question: How did you solve this Problem?
Could be a big help for other Problems :D

TheIndieStation

  • *
  • Posts: 2182
it's not a problem. The behavior that has the 4 red blocks happens to be called before the 4 behaviors that you call upon with those blocks. When that happens, those 4 other behaviors are no loaded yet. So if you wait just one frame, then ou can load them