playMaker

Author Topic: Trigger work hit and miss!  (Read 571 times)

hoyoyo80

  • Junior Playmaker
  • **
  • Posts: 75
    • View Profile
Trigger work hit and miss!
« on: October 14, 2018, 03:23:33 AM »
Hi all...

In other topic im asking about deducting health. But now my prefabs is ready to get hit and die. But i found that when i use more that one prefabs, the deducting sometime work and sometimes dont.

What could be the problem.
Thanks

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4448
    • View Profile
    • jinxtergames
Re: Trigger work hit and miss!
« Reply #1 on: October 14, 2018, 05:15:43 AM »
Hi.
You can continue in your last thread as it is still on the same topic.
as not everyone has seen the other topic, so the will not know what you are talking about :)

i will reply there
FOR HIRE:Playmaker/C#

Playmaker Samples <-------------> Easy Exporter <---------------------> TPA Actions

hoyoyo80

  • Junior Playmaker
  • **
  • Posts: 75
    • View Profile
Re: Trigger work hit and miss!
« Reply #2 on: October 14, 2018, 05:36:15 AM »
Thanks Actually its not the same problem. Everything work well if i only use on prefab, but i tried several prefabs and the trigger mess up.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4448
    • View Profile
    • jinxtergames
Re: Trigger work hit and miss!
« Reply #3 on: October 14, 2018, 09:26:34 AM »
Hi.
I did not say its the same problem, but its on the same topic.

You will have better/faster an answer to your question as it is related to that thread.
You can also add a link to your post if you are referring to another post.

It is also good to give as much info you can give about your setup (images/videos)
as there can be many reasons why things do not work and it will make it easier to give a valid answer.
FOR HIRE:Playmaker/C#

Playmaker Samples <-------------> Easy Exporter <---------------------> TPA Actions

hoyoyo80

  • Junior Playmaker
  • **
  • Posts: 75
    • View Profile
Re: Trigger work hit and miss!
« Reply #4 on: October 14, 2018, 07:50:36 PM »
Thanks. Sorry for that. This is the setup.

Maybe my method is wrong.
Setup enemy: I use gameobject variable to store the object
Player hit enemy: I use global event from player to enemy
Gethit: Received the event and deduct health and check dead/alive.

Thanks again:)

hoyoyo80

  • Junior Playmaker
  • **
  • Posts: 75
    • View Profile
Re: Trigger work hit and miss!
« Reply #5 on: October 15, 2018, 12:23:41 AM »
Hi..yes...i found the answer.

Its not what i think is the problem.
My problem is, each prefab hitbox that detect the damage collide with each other and get scatter around the level. i fix it by ignoring hitbox-hitbox collision in matrix.

Thanks for viewing esp @djaydino:)

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4448
    • View Profile
    • jinxtergames
Re: Trigger work hit and miss!
« Reply #6 on: October 15, 2018, 12:26:04 AM »
Hi,
Happy to help.

But you might want to remove the 'next frame event' on the 1st image,
as your trigger event will only work 1 frame now.
FOR HIRE:Playmaker/C#

Playmaker Samples <-------------> Easy Exporter <---------------------> TPA Actions