playMaker

Author Topic: Game Object Compare  (Read 1903 times)

che1974

  • Playmaker Newbie
  • *
  • Posts: 12
Game Object Compare
« on: October 14, 2016, 02:53:40 PM »
Hi all,

I am new to Playmaker and Unity and need some Help :-)
Have some problems with Game Object Compare.

Set an Array with 12 Objects (6 Pairs) and shuffle them.
I pick 2 Objects (Mouse Pick) and store them in pick1 and pick2 (global).
After i want to compare and if equal destroy them.
(Memory Game)


It will stop at Game_Compare - Frankenstein(Clone) and Frankenstein(Clone).
But why ????

« Last Edit: October 14, 2016, 02:56:20 PM by che1974 »

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 715
    • Flashing Lights
Re: Game Object Compare
« Reply #1 on: October 14, 2016, 03:04:31 PM »
Game Object Compare will check if the variable 1 contain the same object as variable 2, but will not check name or instance.
In this situation you can Get Name of game object and compare strings for example.

che1974

  • Playmaker Newbie
  • *
  • Posts: 12
Re: Game Object Compare
« Reply #2 on: October 14, 2016, 03:28:01 PM »
Thanks.
I will test it.

che1974

  • Playmaker Newbie
  • *
  • Posts: 12
Re: Game Object Compare
« Reply #3 on: October 14, 2016, 03:48:16 PM »
Thanks a lot.
Now it works, perfect - you will save my day  ;)