Hello everyone,
How do I make the character perform the death animation?
This is what I have at this moment:
But it doesnt work… the player stands still…
Thanks in advance
Hello everyone,
How do I make the character perform the death animation?
This is what I have at this moment:
But it doesnt work… the player stands still…
Thanks in advance
Does rambo.direction
contain a hyphen?
hello @Rafael_Silva,
i believe your killRambo
function should be like this:
killRambo(rambo) {
this.rambo.setVelocity(0);
this.rambo.alive = false;
this.rambo.anims.play('dead-'+rambo.direction, true);
}
If the context of this killRambo
function is the scene and if you have an object called rambo
in your scene.
Ye, forgot the hyphen…
Thanks !!
Glad we could help.
I guess you can even omit the this
keyword since rambo is passed as the first argument in killRambo()