danhanfry's Recent Forum Activity

  • caiorosisca Thanks for wanting to help. Forgive me for my English.

    I have to give a value to a variable, but this variable is selected from an Array

    Now I have only 2 buildings. Glass and metal. So could do this

    but imagine you have 10, 20 or 60 different buildings.

    I just want to assign a value to a variable without selecting literally

    have an alternative option to assign values ??to variables.

  • GeometriX I'm sorry to bother you, but I could help.

  • revived the post. I need to get to a solution.

  • You can put a hidden object in close and no other in close and then create the event when the mouse click on these hidden objects.

    Remember you will need to unite (Pin)

  • CASE: In a game (rts type) where I am designing building/resources: mine (ore), mine (iron), etc... I can work with global variables for: mine or building level, resources quantity, etc...

    But the problem is for each new building or resource as we have to introduce the value of variables one to one. This is a waste of time...

    I want do it with arrays, but as you know, the dialog of variables doesn't allow it. With arrays you can modify once instead of multiple times for each new building...

    What do you thinks about this? Any suggestion or other way to do this?

  • I need to fix it please.

  • I think google translate is not very good jajaja.

    I'm trying not select a variable literally.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • blackhornet

    I want to do this

    Not know how to explain. I hope someone gets me understand.

    blackhornet thank you very much for helping me.

    I will research the dictionary

  • Really blackhornet Thank you, but it is not that.

    Do not explain to me the language.

    I'll try again.

    In your example arrayDemo_BHTB

    you define Set cristal_LVL to Array.at (0.0)

    Then when I have 50 mines or buildings construction. We'll have to program each.

    However what I want is to program in Array 1 time per cycle and then adding the value you deserve. And if I decide to go from 50-68 buildings, not I have to change anything. Only the array.

    At the end of the day I need to assign a value to a variable but instead of selecting the variable in this way.

    You can select the variable by an array cycle.

    instead of defining a select so you can define it by code

    Array (1, 1) = Array (0, 1)

  • thanks for help blackhornet .

    But what I need is to assign a value to an array variable array traveled by ie.

    Array (1, 1) = Array (0, 1)

    Variable = String Text

    cristal_LVL = wood

    That's what I need

    I hope someone can help me.

  • Good, I will try to explain my problem to see if we can resolve it. I'm very sorry but there are English speaking and I'm using a translator.

    I'm a programmer and maybe for that reason I'm trying to do something actually done otherwise.

    I'm trying to cycle in array to MINIMIZE the task in case you want to add or expand the level of mines or buildings.

    We started taking two mines. Wood and Glass. We create two variables to see what levels are in the game.

    We create an Array and introduce some data.

    Array( 0 , 0 ) = "cristal" ; this is a text string

    Array( 0 , 1 ) = "metal" ; this is a text string

    Array( 1 , 0 ) = cristal_LVL ; This is a variable

    Array( 1 , 0 ) = metal_LVL ; This is a variable

    El Array.X = 0 equals strings

    El Array.X = 1 are variable

    I show pictures of the project.

    As a non-English speaking and I do not get how to explain what I want to achieve. You had better put trying to explain what I want a photo.

    You could say that what I want is, instead of choosing a variable.

    Assign a value has a variable but we walk on an array.

    Really sorry, I hope you understand me because the images without knowing English I can not express what I want to accomplish.

    I hope your help Thanks.

  • Do not attempt to translate Construct 2. The feature to load strings from the .xml file was never finished. You cannot translate all of Construct 2, and sometimes if you translate something, it will break that feature.

    Thanks for answering.

    Just one last question, do you know if there is intention that in the future can?

danhanfry's avatar

danhanfry

Member since 1 Mar, 2014

None one is following danhanfry yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies