Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: derkoi on May 20, 2013, 11:54:11 AM

Title: Help with Arraymaker & OverlapSphere
Post by: derkoi on May 20, 2013, 11:54:11 AM
Hi,

I'm trying to destroy objects that are in a blast radius in my game. I'm using the OverlapSphere action found here (http://hutonggames.com/playmakerforum/index.php?topic=2914.0).

I've set everything up so when the bomb detonates the array gets a list of objects in the radius. What I'm unsure about is how to send a message to all FSM on those objects in the array?

Can anyone help please?
Title: Re: Help with Arraymaker & OverlapSphere
Post by: jeanfabre on May 20, 2013, 12:50:21 PM
uhm,

 That sounds like a job for a new custom action for playmaker :)

 for now, simply use the "ArrayListGetNext" and send an event to each. that will do fine as well.

bye,

 Jean
Title: Re: Help with Arraymaker & OverlapSphere
Post by: derkoi on May 20, 2013, 01:10:05 PM
Thanks, That seems to work fine however I've noticed the action doesn't seem to pick up animated characters. Is there something I may be missing?  ::)
Title: Re: Help with Arraymaker & OverlapSphere
Post by: jeanfabre on May 21, 2013, 02:43:41 AM
Hi,

 that action iterate through the array content. Can you elaborate, cause I don't understand where would be the problem. Are you properly storing the GameObject int the array?

bye,

 Jean
Title: Re: Help with Arraymaker & OverlapSphere
Post by: derkoi on May 21, 2013, 03:28:29 AM
The overlapSphere action is not adding animated characters to the array list. All other objects are added fine & can be destroyed apart from the enemy characters which makes me think it's something to do with them being an animated skinned mesh?
Title: Re: Help with Arraymaker & OverlapSphere
Post by: jeanfabre on May 21, 2013, 05:50:35 AM
Hi,

 I am not sure, It seems you are getting the wrong reference, ArrayMaker only store GameObjects, not components. this might be the problem.

 also, what do you mean by "animated character"? what component is it made of?

bye,

 Jean
Title: Re: Help with Arraymaker & OverlapSphere
Post by: derkoi on May 21, 2013, 05:54:49 AM
The characters are gameobjects.  :-\

The animated characters are 3d models with animation data on them & Biped skeleton data.
Title: Re: Help with Arraymaker & OverlapSphere
Post by: jeanfabre on May 21, 2013, 05:59:35 AM
Hi,

 I think your problem is elsewhere, like you are not passing at all a gameObject reference  ( null ) , or something. If you can send me a repro scene, that would be great.

bye,

 Jean