Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: hoyoyo80 on October 14, 2018, 03:23:33 AM

Title: Trigger work hit and miss!
Post by: hoyoyo80 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
Title: Re: Trigger work hit and miss!
Post by: djaydino 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
Title: Re: Trigger work hit and miss!
Post by: hoyoyo80 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.
Title: Re: Trigger work hit and miss!
Post by: djaydino 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.
Title: Re: Trigger work hit and miss!
Post by: hoyoyo80 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:)
Title: Re: Trigger work hit and miss!
Post by: hoyoyo80 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:)
Title: Re: Trigger work hit and miss!
Post by: djaydino 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.