playMaker

Author Topic: How to get the array numbers of objects in the array that collided  (Read 1255 times)

playmakertester

  • Full Member
  • ***
  • Posts: 211
How to get the array numbers of objects in the array that collided
« on: September 28, 2020, 09:34:33 AM »
Hello. I would like to do the following two things Could you advise me on good action names and how to implement them?

1. When a specific tag collides with an object, get the array number of the object in the arrary.

2, Select all objects after the array number and make Use Gravity active.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7622
    • jinxtergames
Re: How to get the array numbers of objects in the array that collided
« Reply #1 on: September 28, 2020, 03:19:48 PM »
Hi.
On collision store the object, then use 'Array Contains' (or 'Array List Contains' if you use Array Maker)
and store the index.

Then you could use a Array Get Next and use the Index as the Start Index.
If you reuse this, you should also set a variable on the 'Reset Flag'
and Before(!) you Array Get Next (in a previous state not in the same state)
Set That variable to true.

playmakertester

  • Full Member
  • ***
  • Posts: 211
Re: How to get the array numbers of objects in the array that collided
« Reply #2 on: September 28, 2020, 11:04:07 PM »
Hi djaydino,

Thank you for always teaching me new actions.

I'll give it a try!

If you have any more questions, please let me ask them.

playmakertester

  • Full Member
  • ***
  • Posts: 211
Re: How to get the array numbers of objects in the array that collided
« Reply #3 on: September 29, 2020, 12:39:01 AM »
Hi djaydino,

Hi.
On collision store the object

I'm looking at several ecosystems, but none of the Collsion Event actions seem to have a "Store Object" section.
Can you tell me the name of the action to acquire the object when collision is done?

Best,
« Last Edit: September 29, 2020, 12:42:32 AM by playmakertester »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7622
    • jinxtergames
Re: How to get the array numbers of objects in the array that collided
« Reply #4 on: September 29, 2020, 08:26:51 AM »
Hi.
They Are called 'Store Collider' :)
it will store the object that has the collider :)

playmakertester

  • Full Member
  • ***
  • Posts: 211
Re: How to get the array numbers of objects in the array that collided
« Reply #5 on: September 29, 2020, 10:39:43 AM »
Oh, that's right.
I thought you would only store Collider!

Thank you! I'll give it a try!