SOLVED Problem with Trigger Event between Actor and Scene Behavior

SpookyBurger

  • Posts: 82
Hi.  The 2 Behaviors I'm working with are

SpawnableItem  Actor Behavior
    22 and 23.png are the screen caps for this behavior
ItemSpawner  Scene behavior  (super original I know :P )
    20 and 21.png are the screencaps for this behavior

The idea is that
- the scene will spawn say 3 items from the lists
- send SpawnableItem info it needs to "change" itself to what it's supposed to be and too track it's list index. in this case a FirstAidKit
- when the item is picked up, send back the info to the Scene behavior
- scene behavior removes the entry off the list from the info it gets

Right now the behavior is creating the actors fine, but all my trigger event blocks aren't working.  The animation is not changing and the items are not being removed from the list.  What am I doing wrong?  Thanks in advance for any help.

« Last Edit: July 18, 2013, 01:09:01 am by SpookyBurger »
Please try out my latest build of Patient 9 here.   http://www.stencyl.com/game/play/23179

SpookyBurger

  • Posts: 82
Please try out my latest build of Patient 9 here.   http://www.stencyl.com/game/play/23179

froz

  • Posts: 250
You need to use internal names of attributes (in the blocks "for last created actor set something for behaviour"). Easiest way to make sure you don't make a mistake when writing an attribute internal name (and behaviour name) is to click on the little arrow in this block and choose "attributes names > behaviour name > attribute name" from the dropdown menu.

SpookyBurger

  • Posts: 82
Solved!  Worked like a charm.  Just had to the method you outline or add the _ to the attribute names.  Thanks a lot!  :)
Please try out my latest build of Patient 9 here.   http://www.stencyl.com/game/play/23179