Playmaker Forum

Playmaker Help & Tips => Playmaker Help => Topic started by: hoyoyo80 on January 27, 2019, 07:10:31 PM

Title: Array of GameObject[SOLVED]
Post by: hoyoyo80 on January 27, 2019, 07:10:31 PM
Hi all,

First of all, thanks for this community for quick respond. My learning prototype is progressing real good:)

Ok, new problem that need guidance. I implementing a simple Trigger around player in beatem up like game, that store Array of All Enemies that get inside trigger and as soon the enemy/enemies move out of the trigger the will be deleted from the Array.

I manage to put them in but have no idea how to remove them accordingly.Can someone shows in step and will try to implement it:)

Thanks
Title: Re: Array of GameObject
Post by: Athin on January 27, 2019, 07:46:52 PM
Hey there.

What I'd do is simply have another trigger that fires off when an enemy leaves the trigger box.  When an enemy leaves, store that unit and then fire off an event to an Array List Remove action using that game object you stored as the target.
Title: Re: Array of GameObject
Post by: hoyoyo80 on January 27, 2019, 09:46:23 PM
Hi...Thanks, browsing thru the command and cannot find Array List Remove.

Basically the step is like u said:

1.Another trigger exit and store the collider as GameObj
2.Remove the object from the array--This part i need guidance since there no remove from array action.

Thanks
Title: Re: Array of GameObject
Post by: Athin on January 27, 2019, 09:58:08 PM
You need to find those actions on the Ecosystem. 

https://hutonggames.fogbugz.com/?W1181

Once you have that on you're project you can search for ArrayMaker and that will give you tons of more options to use then the standard array actions. 

Definitely worth getting that set up as you'll probably need a ton of actions found on that as well.

Thanks
Title: Re: Array of GameObject
Post by: hoyoyo80 on January 27, 2019, 11:31:15 PM
Oh Sweet!!! Thanks, ArrayMaker work easier:) Thanks Again!