playMaker

Author Topic: Array of GameObject[SOLVED]  (Read 1294 times)

hoyoyo80

  • Full Member
  • ***
  • Posts: 136
Array of GameObject[SOLVED]
« on: January 27, 2019, 09: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
« Last Edit: January 28, 2019, 03:55:04 AM by jeanfabre »

Athin

  • Full Member
  • ***
  • Posts: 163
Re: Array of GameObject
« Reply #1 on: January 27, 2019, 09: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.

hoyoyo80

  • Full Member
  • ***
  • Posts: 136
Re: Array of GameObject
« Reply #2 on: January 27, 2019, 11: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

Athin

  • Full Member
  • ***
  • Posts: 163
Re: Array of GameObject
« Reply #3 on: January 27, 2019, 11: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

hoyoyo80

  • Full Member
  • ***
  • Posts: 136
Re: Array of GameObject
« Reply #4 on: January 28, 2019, 01:31:15 AM »
Oh Sweet!!! Thanks, ArrayMaker work easier:) Thanks Again!