Question on Attributes with regard to Created Actors

sfernald

  • Posts: 12
Ok, I'm dynamically creating an actor in a behavior in design mode, but I need to set an attribute of the actor so he functions correctly.

I've search all of the functions, but I'm not seeing a way to set attributes of a created actor.

Please help, thanks.

Hectate

  • *
  • Posts: 4643
Look under the palette portion of Messaging > For Actor > Attributes.
:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.

redpesto

  • Posts: 134
Just in case you didn't find it, I've attached a screenshot, click where the red circle is and the attributes tab opens up.

chaosoul

  • *
  • Posts: 260
Redpesto I'm not sure if thats what he means.
COOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEESS

sfernald

  • Posts: 12
No, I don't think that's it.

I'm creating the actor within another actor's behavior using the "Create Actor At". When the actor is created, the attributes are uninitialized. I know how to set "actor values" of newly created actors, but not attributes.

Does that make more sense?

I think I can do it another way since I'm running out of time right now.

sfernald

  • Posts: 12
Look under the palette portion of Messaging > For Actor > Attributes.

Oh I see. I think that's it. Thank.

coleislazy

  • *
  • Posts: 2607
One thing to keep in mind: you have to use the internal attribute name with these blocks. By default, that is the attribute's name with spaces removed and preceded by a an underscore. For example: an attribute called Running Speed would have an internal name of _RunningSpeed.

sfernald

  • Posts: 12
Look under the palette portion of Messaging > For Actor > Attributes.

Oh I see. I think that's it. Thank.

Not working for me.

Using this syntax:

For [Newly Created Actor], set ["Attribute Name which is a region"] to ["The name of the region I want it is use"] for behavior ["Climb Rope"].

Just doesn't seem to do anything.


sfernald

  • Posts: 12
One thing to keep in mind: you have to use the internal attribute name with these blocks. By default, that is the attribute's name with spaces removed and preceded by a an underscore. For example: an attribute called Running Speed would have an internal name of _RunningSpeed.

Tried that too. Couldn't get it to work. Will play with it some more.

If I'm trying to assign it a region, do I just use the normal region name, ie (RopeRegion)?

« Last Edit: August 21, 2011, 03:01:12 pm by sfernald »

Sunflower

  • Posts: 591
No, you don't use name. You use Region getter.

You can find it in Scene >> Regions, there should be a block without any text except dropdown list for regions. I'm just not sure if this "RopeRegion" will be listed here, because I don't really work with regions. If you can't find it, you apparently need to store it in some attribute or something. Oh well! ^^'

sfernald

  • Posts: 12
Thanks, I've managed to work around it. Don't have time to get stuck with the competition running out of time. I will try it again though when I have more time. Thanks!