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 👈



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 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:

Moving objects or Dynamic Collision Library should also help: ..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
  • a distance 2d (or 3d) check between monster and player

    if( entitydistance( monster, player ) < monsterradius+playerradius )
    ;monster is near enough player
  • 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)

DcpSCP commented:

Thanks for the answers!

Reply To Topic (minimum 10 characters)

Please log in to reply