Stencyl 3.4.0 is now out. Get it now!

Getting attributes from other actors (dead link)

Usernoob

  • Posts: 6
Hello wise mens (and wise girls), i have another problem. i have a enemies with a variable attribute, that enemies shoot balls, the balls collide whit the player and another attribute of the player (life or armor) decrease as the attribute of the enemy that shoot the ball.

In resume, i need take the value of attribute of another actor.

I search in the forum and in google, i find this:

http://community.stencyl.com/index.php?topic=14474.0

Buuut the link are dead. And i dont find that in the blog.

SadiQ

  • Posts: 1720
Try experimenting with this block (found in Behaviors -> Atributes):
Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

LIBERADO

  • *
  • Posts: 2337
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

Usernoob

  • Posts: 6
Thanks again, I do not know how I have not seen that part. I think that from now on I'm better at experimenting instead of coming running to the forum to ask ...

PD:  These block only allows to select to objetive the own actor who owns the block or the last actor collided or created. I think it would end sooner if I could write in code directly as changing an attribute to an actor from any other actor would end almost all my problems with the game.

« Last Edit: September 08, 2017, 01:28:26 pm by Usernoob »

JeffreyDriver

  • Posts: 1108
Quote
Thanks again, I do not know how I have not seen that part. I think that from now on I'm better at experimenting instead of coming running to the forum to ask ...

Don't worry about it. It's how we learn.

Quote
PD:  These block only allows to select to objetive the own actor who owns the block or the last actor collided or created. I think it would end sooner if I could write in code directly as changing an attribute to an actor from any other actor would end almost all my problems with the game.

Assign an actor attribute to the actor you want to refer to.

Usernoob

  • Posts: 6
The problem is the same. If you create an attribute type "actor" you only can select for the attribute "self", "Last created actor", "Last collided actor" or other attribute.