Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

  • 0
Sign in to follow this  
Aeleas

[Solved]Activate objects inside array by numbers ?

Question

Posted (edited)

Hi

00.png.edec8a5eee6c7168c1756850a1eafc67.png

How to activate/deactivate the objects in my array by using numbers ? As you see on image, there is a parent and 6 child objects. 

In my script, "weapon_carry_pistol" is the parent object. I need to put all child objects inside it on my array and activate them by numbers.

If activeObjects = 1. the first element in my array will be active. and so on.

Please login or register to see this code.

 

Edited by Aeleas

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

It's hard to understand what exactly you want.
Your code sample already is answer on your question.

 

Maybe?

Please login or register to see this code.

 

Share this post


Link to post
Share on other sites

  • 0
Posted (edited)
Please login or register to see this quote.

Thank you for notes me that. I was sleeping when post this.

Your script is correct and will work only on parent objects. I'm looking for the child objects inside the parent object.

Do I need to use loop or foreach function to active child objects one by one? Or, I have to use list or array for them also  ? I  don't want to Drag&Drop.

 

Update 1:

For all those have same issue. Here how I solved it and sorry for misunderstanding. It was my fault not explained well my problem.

Please login or register to see this code.

 

Edited by Aeleas

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...