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  
ProExtremePL

Array numbers

Question

Basically I have a really small problem with array numbers.

 

Please login or register to see this code.

 

But instead of this I would like to make something like this:

 

Please login or register to see this code.

 

Thanks for the answer.

 

 

 

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 1

Use a for loop. It won't be as small as you want it to be, but it's a much better method to use than a nest of conditional statements like that for this specific usage.
 

Please login or register to see this code.

 

This solution I typed out won't work as it is for what you need, as it will end up spawning a building if (or for) each and every boolean turns to be true; nevermind it having to be called within Update(). Hopefully this steers you in a decent direction.

 

Please login or register to see this link.

Share this post


Link to post
Share on other sites

  • 0

@Heimderdinger Actually that works perfectly for this!

 

Guys one more question.

I want to make Guide Book, like for example 'The Forest' have.

The problem is that I can't figure out how to make this working.

 

Basically, mechanics should be looking like(I know how to set active guidebook, that's not a problem if someone cares... xD):

1. Opening the Guide Book Canvas.

2. Actually made 2 buttons - first for pillars(1 in array index), second for foundations(0 in array index).

3. If I click 'Pillar' guide book should disappear and pillar blueprint should appear, the same for foundations...

Please login or register to see this spoiler.

And there is the problem, I can't define that if you click the Pillar Button then pillar's blueprint appear(building system is already made(which means that pillar's blueprint is ready) but I can't invoke it with button).

Actually 2 array numbers exist - 0 for foundation, 1 for pillar.

 

I'm trying to make this for 1 hour and no results :/

 

 

 

 

Share this post


Link to post
Share on other sites
  • 0

Why can't I edit my post???

 

This image probably better shows this:

Please login or register to see this spoiler.

 

Share this post


Link to post
Share on other sites
  • 0

My last problem was that stupid like me, actually did it in 3 minutes... I forgot to write that I solved it.

 

SOLVED.

 

Thanks Heimer.

Edited by ProExtremePL

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...