Announcement

Collapse
No announcement yet.

Damaging platform with timer over time + character can get damage when stepping on it

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Damaging platform with timer over time + character can get damage when stepping on it

    Hello people,

    I am trying to prototype some mechanics for a level and I am having some troubles to set up a platform( right now just a square tile) which would inflict damage. This platform wether the player character would be stepping on it or not, would be always activated, giving damage in cycle during 2 seconds (random time reference) and then would be deactivated during again same amount of time and so on and so on. For the player feedback, a particle effect would do the trick, being triggered while the giving damage is activated. The platform(s) ideally would start the(ir) cycle when the player cross a trigger volume (call in level blueprint).

    I am building everything on top of the recreation of the third person template from scratch.

    The platform itself it a basic static mesh, ground 400 by 400 with 2 collision box. One blocking everything for the player to step on it and the other one to give damage each 2 sec. Ig the player walk during this 2 second he would get damage. If not, he is safe.

    So far, I tried to make the platform give damage and it worked. I created a function inside the blueprint that gives damage to the character. However, I had some trouble to set up the timing damage system meaning: IsPlayerOverlapping when platform giving damage is inflicting some? I dont know if a platform can give damage without anything overlapping or interacting with it?

    I was also trying to set a "IsPlayerInside" bool as false in the construction script of the blueprint to later check with a branch for the player to receive damage if overlapping when platform is giving. if not player is safe. Not really sure how to do that though.

    I heard about the "pain causing volume" that could work but I dont know how to include them inside a Blueprint?

    Any help to get me started would be appreciated, right now I feel like starting over as I am kinda lost in the process. If someone has any example to guide me or a step by step process to show, I would be grateful. I have little experience with unreal4 and trying to get more. (Also, I am not a programmer).

    Thank you very much



    Al

    #2
    Hello again,

    My help request was not very successful but I ll show what I have got so far. I had to stop working for a while but just got back on it. So my issue are:

    1. how to inflict damage regardless of a collision with a character?
    1b. Launch the whole system trap from the level blueprint trigger (i know for overlap but can't manage to launch the function inside the blueprints).
    2. My timer to call the function is not really working. Trying to figure that out. Platform should switch on and off with 2 seconds intervals.
    3. In the level blueprint, I am using a custom even to call the blueprint. Don't know if its the best way to do what I would like to do.
    4. I created two function one to inflict damage and one to stop making damage. Got a health system with basic HUD and float. Again, I am trying, not sure if this is the best way do achieve what I intended.

    Any help is welcome!

    Here some screnshots

    Click image for larger version

Name:	Blueprint Preview.jpg
Views:	1
Size:	416.9 KB
ID:	1098520Click image for larger version

Name:	call the BP with custom event.jpg
Views:	1
Size:	624.8 KB
ID:	1098521Click image for larger version

Name:	event graph of blueprint.jpg
Views:	1
Size:	633.8 KB
ID:	1098522Click image for larger version

Name:	Function floor make damage.jpg
Views:	1
Size:	805.5 KB
ID:	1098523Click image for larger version

Name:	floordoesntmakedamage.jpg
Views:	1
Size:	653.2 KB
ID:	1098524Click image for larger version

Name:	construction script.jpg
Views:	1
Size:	593.8 KB
ID:	1098525

    Comment

    Working...
    X