Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: curb47 on October 10, 2020, 07:24:57 AM

Title: Collide / Get Tag / Send Event on Tag [SOLVED]
Post by: curb47 on October 10, 2020, 07:24:57 AM
Hello,

I've been reworking some old FSMs and stumbled into this mash up, where I've got a load of Collider Events on one object catering for different Tags, so depending on what the spaceship bumps into, it sends different events...
(https://i.postimg.cc/0jjYX4NF/Screen-Shot-2020-10-10-at-11-50-26.png)

It works, and gets the job done but it's a bit over the top, right? I thought there must be a more elegant way of doing it so i came up with this:
(https://i.postimg.cc/Gm9dqxrN/Screen-Shot-2020-10-10-at-11-50-55.png)

I thought -'Yeah! that'll work!'

Here's the State opened up...
(https://i.postimg.cc/wMbbvJPy/Screen-Shot-2020-10-10-at-11-51-14.png)

It looks like it should work, but alas, it's not. It kind of nearly works, but the Get Tag, isn't getting the tag...
(https://i.postimg.cc/DzHr86yK/Screen-Shot-2020-10-10-at-11-51-49.png)

Can somebody please explain what I'm doing wrong? The logic is sound, right?

Thanks in advance.

J.



Title: Re: Collide / Get Tag / Send Event on Tag
Post by: heavygunner on October 10, 2020, 01:46:21 PM
Did you try marked Every Frame ?
Title: Re: Collide / Get Tag / Send Event on Tag
Post by: curb47 on October 11, 2020, 02:45:56 AM
Ah! Good point, I'll try that.

Thanks!
J.
Title: Re: Collide / Get Tag / Send Event on Tag
Post by: curb47 on October 12, 2020, 01:01:20 AM
I tried Every Frame, and the logic resulted in the Exceeded Maximum Count (1000) error, so I ended up splitting the State into 2; 1 for the collider and one for the Get Tag and Tag Switch, set Action Sequence.

It might not be 'correct' but it now works.

(https://i.postimg.cc/XJvsKTrD/Screen-Shot-2020-10-12-at-05-56-41.png)

(https://i.postimg.cc/C1t9RFc4/Screen-Shot-2020-10-12-at-05-56-51.png)