top of page
Finlay

The Spike

The images below are of a game attribute I have made in Unreal Engine. The purpose of this spike is to deal damage to the Third Person Character in my game. The spike works when the Third Person Character enters the spike's collision box, it then deals 100 damage towards the player and kills him, causing an instant respawn.

Here is an image of the collision box:

As well as the spike and the collision box I also had to script it in the event graph. The script works by asking if the character has overlapped the collision box, if there is no detection of the character then nothing happens, however if the collision box is overlapped by the character then he will taken damage. This works by giving are Third Person Character a health variable of 100, so that when he touches the spike it will take away all his health causing him to die and respawn.

Here is an image of the spike's script:

Finally I added the spike into my game with a nice red metallic texture and put in on one of my jump platforms. This is going to prevent the player from just hopping onto the platform, instead they are forced to procced with more caution as if they die its back to the beginning!!

Here is a picture of the platform I have implemented the spike on:


Overall I am very happy with the spike and how it works, I look forward to seeing where I can implement this in future projects and improve it further.


2 views0 comments

Recent Posts

See All

Comments


Post: Blog2_Post
bottom of page