Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: johnmadden on October 14, 2017, 01:48:48 AM

Title: Game Object Compare?
Post by: johnmadden on October 14, 2017, 01:48:48 AM
I'm making a gun and I have a Game Object Compare function on my FSM and I would like it to compare the current object (magazine) to another exact copy of the magazine and it says they're not equal when they're the exact same prefab. When I use the find child by name action it also doesn't recognize the object despite the name being correct.


Also I'm trying to send a Game Object variable to the parent, how would I do that?
Title: Re: Game Object Compare?
Post by: djaydino on October 14, 2017, 02:15:12 AM
Hi,
Actually it is not exactly the same object as it is a 'copy' from the object.

You can use "GameObject Compare Tag" and setup tags on your objects.

To get/set variables on other objects you can use get/set FSM actions.

if you need to find the parent 1st you can use get parent.
Title: Re: Game Object Compare?
Post by: Fat Pug Studio on October 14, 2017, 04:15:16 AM
GameObject =/= GameObject (1) if that's what you're aiming at. However, if you child two same objects under the magazines they will retain their names, so you can compare them if you want to do it by comparing objects, but there are better ways as djaydino noted.