Assigning a value to an actor?

Galdon2004

  • *
  • Posts: 318
I am working on a puzzle mechanic which involves switching different actors to different "channels", or essentially wavelengths that determine what they interact with. For instance, a boosting tile on channel 3 would increase the potency of any tile that has an affect that is also connected to channel 3. Part of the puzzle would involve changing the channel different tiles are on, so they are affected by different sets of values.

For the sake of working as a puzzle, however, I would need these actors to start on specific channels. Since there could be duplicates of each actor, I'd have to use actor attributes for it, rather than game attributes.

There are two messy ways to do this that I know of; making a different version of every actor to match every possible starting value, but that would get very bloated very quickly. The other way would be to have an "assign channel" global attribute, and have the scene spawn each actor and then the actor change it's channel to match the assign one. But that has the problem that I would need to space them out at least .1 seconds apart to make sure every actor gets the right value, which could make the set-up of puzzles with a lot of actors take a perceivable amount of time to assemble which might annoy players.

Is there any way to have the game create an actor, and then more directly assign a specific value to one of it's actor attributes?

chrizt

  • Posts: 345
have you tried using the get set attribute blocks? they are in the pallete
need help with behavior? game design? graphic design? just contact me
skype : christian.atin
email : christianatin27@gmail.com

Galdon2004

  • *
  • Posts: 318
have you tried using the get set attribute blocks? they are in the pallete
I found "for [actor] set [text] to[value] for [behavior]", is that what you mean? I'm guessing text is the variable, but for Behavior what do I put if the actor attribute belongs to the actor's event rather than a separate behavior?

Justin

  • *
  • Posts: 4716
It assigns the value directly to the actor. Attached behaviors/events are irrelevant. You can assign it from one event/behavior and retrieve it from another.
For Live Support: Join our discord server and ping me @justin.
I'm most often available between 10am and 10pm Japan time. (GMT+9)

chrizt

  • Posts: 345
i think he was asking about how to select the behavior if its not an attached actor behavior. you can click on the select attribute, find actor events, then find your actor name, it will give you access to the behavior.
need help with behavior? game design? graphic design? just contact me
skype : christian.atin
email : christianatin27@gmail.com

Justin

  • *
  • Posts: 4716
Yeah, sorry, I totally didn't read the question properly.
For Live Support: Join our discord server and ping me @justin.
I'm most often available between 10am and 10pm Japan time. (GMT+9)