playMaker

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

hoyoyo80

  • Full Member
  • ***
  • Posts: 136
Trigger work hit and miss!
« on: October 14, 2018, 06: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: 7615
    • jinxtergames
Re: Trigger work hit and miss!
« Reply #1 on: October 14, 2018, 08: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

hoyoyo80

  • Full Member
  • ***
  • Posts: 136
Re: Trigger work hit and miss!
« Reply #2 on: October 14, 2018, 08: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: 7615
    • jinxtergames
Re: Trigger work hit and miss!
« Reply #3 on: October 14, 2018, 12:26:34 PM »
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.

hoyoyo80

  • Full Member
  • ***
  • Posts: 136
Re: Trigger work hit and miss!
« Reply #4 on: October 14, 2018, 10: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

  • Full Member
  • ***
  • Posts: 136
Re: Trigger work hit and miss!
« Reply #5 on: October 15, 2018, 03: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: 7615
    • jinxtergames
Re: Trigger work hit and miss!
« Reply #6 on: October 15, 2018, 03: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.