playMaker

Author Topic: Find Closest not working.  (Read 2972 times)

Padenlee

  • Junior Playmaker
  • **
  • Posts: 63
  • You can't hit what you don't shoot for!
Find Closest not working.
« on: July 18, 2011, 09:54:13 PM »
Paden - "Unleash the shmooshing dogs of war!"

I've been working with PM for about a month.  Two thumbs up BTW!

I'm having problems getting Find Closest to work as it should. 
I'm trying to have a prefab find the closest other prefab of a certain type.

FSM Action:  Find Closest

Everything works if I leave the setting Game Object set to UseOwner and specify With Tag to a tag (player2), it will find the closest objects with the tag (player2). 
But if I switch the Game Object to SpecifyGameObject and then drag and drop a Prefab into the None(GameObject) area.
The Find Closest dose not find the Prefab/s in the world, tagged or untagged.


I've tried many-ah different things to get it to work:

Created spawn points in the world to spawn the prefab object that is looked for, rather then being in the world on Run.
Messed with the Must Be Visible checked box.
Tried different objects trying to find other objects.

None working.  Only works if only a Tag is specified without a object, as soon as an object is specified, it dose not find the right object.

My work around is to have different tags for different types of objects that need find the closest objects (Ally find closest enemy), player1, player2, unit1, unit2, building1, building2 etc. 8P



The method I used to make the prefab is as follows:

Import FBX from Blender.
Drag from Projects tab into world.
Create prefab in Project tab.
Drag the new Object from Hierarchy tab onto prefab in Project tab.


-Paden Pierry
@padenpierry
Apple inc.'s first TV show, EP 1.
Game Dev since 2007
Coolest client: Bridgestone

oliverillustrator

  • Playmaker Newbie
  • *
  • Posts: 2
Re: Find Closest not working.
« Reply #1 on: November 19, 2013, 03:39:33 PM »
I have exactly the same problem.
The find -nearest-gameobject -from-list action works flawlessly under the same conditions.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Find Closest not working.
« Reply #2 on: November 20, 2013, 12:34:19 AM »
Hi,

 So is it sorted?

bye,

 Jean