How create actor after death of other actor.

Ganu

  • Posts: 224
I need script that will create 5 beads of blood after death of my character but the problem is probably how get the position of player after death. I tried making game attribute iwth coordinates of player and setting them as coordinates of blood beads but still don`t work.

I`m noob on stencyl my whole experience is game made in Game Maker. So don`t shoot me.
Currently waiting for joints in stencylworks.

coleislazy

  • *
  • Posts: 2607
Give the actor a "when this hears" block and call it "die". When you want to kill the actor, use a messaging block to tell him to "die". Then, in the "when this hears die" block, create the blood, then finish it by killing the actor.

Ganu

  • Posts: 224
Give the actor a "when this hears" block and call it "die". When you want to kill the actor, use a messaging block to tell him to "die". Then, in the "when this hears die" block, create the blood, then finish it by killing the actor.
Hmm, what if player is always killed by other actor in this case spikes they, have blocks: if the bottom was hit kill last collided actor.
Can I use message in spike to tell player to die [create blood] ?

Edit: I don`t have stencylworks in front of me but can I just create blood in spike`s behaviour and position of alive player and then kill them. <Gore xD>

« Last Edit: August 22, 2011, 12:45:42 pm by Ganu »
Currently waiting for joints in stencylworks.

Hectate

  • *
  • Posts: 4643
Yep, either option will work.

1. Create blood at the location of impact via spikes - both actors will be there regardless.
2. Tell player (collided actor) to create blood, and THEN kill player (collided actor).
:
:
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.

Ganu

  • Posts: 224
Hmm I`m so nooby I can`t get to work:
for spike
 If (the top was hit by player)
{switch animation to 'blood'}

 if (the top was hit by actor other than player)
{kill}
Currently waiting for joints in stencylworks.