How do i make my monster kill the player?  


👉 BlitzCoder will be building a new platform and other plans to preserve and continue the Blitz legacy.

To be able to achieve this goal, we need your support by becoming a Patreon Paid Member 👈

 

Tweet
DcpSCP

i'm making a horror game in blitz3d the monster follows you and everything but it doesnt kill you i want to make when you touch him the game closes or a death screen

ceeminus commented:

judging by your user name you are into scp..so have you look into the source?

DcpSCP commented:

nope i didn't looked at the source

ceeminus commented:

well you should..the code you are asking for s in there

CraigTheCoder commented:

RonTek has posted a topic on a collision trigger system. You should ask him about it, as I can't find the topic myself.

  BlitzCoder commented:

Trigger System is here: https://www.blitzcoder.org/forum/topic.php?id=1537

Moving objects or Dynamic Collision Library should also help: https://www.blitzcoder.org/forum/topic.php?id=154 ..just needs detection not response

RemiD commented:

several ways :

  • a coordinate 2d (or 3d) check between monster x, z and player x, z

    if( entityx(monster,true) > entityx(player,true)-monsterradius-playerradius and entityx(monster,true) < entityx(player,true)+monsterradius+playerradius )
    if( entityz(monster,true) > entityz(player,true)-monsterradius-playerradius and entityz(monster,true) < entityz(player,true)+monsterradius+playerradius )
       ;monster is near enough player
    endif
    endif
  • a distance 2d (or 3d) check between monster and player

    
    if( entitydistance( monster, player ) < monsterradius+playerradius )
    ;monster is near enough player
    endif
  • a ellipsoid -> mesh collision check between monster and player

  • a linepick ->mesh check between monster and player

  • a meshesintersects (low tris) check between monster and player

Grindalf commented:

you could take a look at this code(shameless plug)
https://grindalf.itch.io/dungeons-of-mysteria-code

DcpSCP commented:

Thanks for the answers!

Reply To Topic (minimum 10 characters)

Please log in to reply