Die on Collision with Actor Type

Annaflower

  • Posts: 11
Hello! Please could you help me making the behaviour "Die on Collision with Actor type" working?
I have to make possible that the Player dies when colliding with another Actor type which is in movement (Back and Forth vertically). Do I have to set up any event or change some code?
Thank you very much for your help!

JeffreyDriver

  • Posts: 2262
Are you using a pre-built behaviour?

It's easy enough to do by creating your own behaviour.

+ ADD EVENT > COLLISIONS
then
ACTOR > PROPERTIES > ALIVE/DEAD > KILL ACTOR

RosalinaGalaxer

  • Posts: 239
Did you set which actor type to collide with?

You can find that in the Behaviors tab of the player, then clicking on the "Die on Collision with Actor Type". If there is no actor specified in the box that comes up, you'll have to specify an actor to collide with.
Ģ̷̓l̴̥̒͑̕͝ì̷̘͈̬͈̖̂͂̔̕t̷͔͇̯̥̬̀̽̓͜͝c̵͇̦̼̮̉̐̈́̕͝ͅͅḣ̵̡̫̞͚̐̅ͅë̶̗̦̪̖͚̜́͊̄͑s̵̺̹̖̼̥̃.̴̮̫͐ ̶̛̓̇̾̎

“I have never seen a more heated discussion about context, jazz, and cats.” - VanillaButterz

Annaflower

  • Posts: 11
Thank you Jeffrey for your answer. I didn't understand very well the procedure...could you please send me a screenshot of what do I have to add in the flow?
- I select the player
- I click on Add Event
- I click on Collisions
- then where are ACTOR > PROPERTIES > ALIVE/DEAD > KILL ACTOR ?

Thanks

Annaflower

  • Posts: 11
Yes Rosalina thanks I have done what you suggest but it doesn't work...

RosalinaGalaxer

  • Posts: 239
That's strange...

ACTOR is a tab on the palette on the right side.
PROPERTIES is a tab that you can select under the ACTOR tab.
ALIVE/DEAD Is a subheading in the PROPERTIES tab.
KILL ACTOR is the block that you want to use to kill your player.

You can also search "kill" and the KILL ACTOR block will show up.
Ģ̷̓l̴̥̒͑̕͝ì̷̘͈̬͈̖̂͂̔̕t̷͔͇̯̥̬̀̽̓͜͝c̵͇̦̼̮̉̐̈́̕͝ͅͅḣ̵̡̫̞͚̐̅ͅë̶̗̦̪̖͚̜́͊̄͑s̵̺̹̖̼̥̃.̴̮̫͐ ̶̛̓̇̾̎

“I have never seen a more heated discussion about context, jazz, and cats.” - VanillaButterz

Annaflower

  • Posts: 11
Thank you Rosalina, i specified the actor type to collide with.
When adding the event collisions: do I select Type &Type?
And then Kill "self" ?

Annaflower

  • Posts: 11
Unfortunately it doesn't work...

Annaflower

  • Posts: 11
Rosalina maybe the reason why it doesn't work is that when testing the game the player is walking under the objects/actors ?

RosalinaGalaxer

  • Posts: 239
Yes you do select "Type and Type" as well as "Kill Self".

If the player is walking under the enemies, then the collision will not occur, and the player will not die. You need to run into the enemy to trigger the code.
Ģ̷̓l̴̥̒͑̕͝ì̷̘͈̬͈̖̂͂̔̕t̷͔͇̯̥̬̀̽̓͜͝c̵͇̦̼̮̉̐̈́̕͝ͅͅḣ̵̡̫̞͚̐̅ͅë̶̗̦̪̖͚̜́͊̄͑s̵̺̹̖̼̥̃.̴̮̫͐ ̶̛̓̇̾̎

“I have never seen a more heated discussion about context, jazz, and cats.” - VanillaButterz