danhanfry's Forum Posts

  • 15 posts
  • 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?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I need to fix it please.

  • I think google translate is not very good jajaja.

    I'm trying not select a variable literally.

  • 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?

  • ok gracias.

    Voy a ver si alguien que sepa aporta como solucionarlo.

    Un saludo.

  • First, keep the file name "en-US.xml" don't change it or it won't work. plus to edit the contents try to use text document

    Hello, Naji. thanks for answering.

    Look, the file retains its name en-US.xml.

    Inside I'm still leaving

    <?xml version="1.0" encoding="utf-8"?>

    <language name="English (US)" ietf-tag="en-US">

    My problem is this.

    <string id="intro1">To start adding events, right-click, double click, or click 'Add event'.</string>

    I modified and everything works perfect, as much more.

    But for example : System / General /

    <string id="-8"> Compare two values </string>

    although the change does not change construct.

    So I do not understand what's going on, maybe I have to change something but are not.

    If I can help thank you very much.

  • Hi, pardon my English.

    I just bought a license and am alucionado builder with the ability of this program, but I'm trying to translate the most important options such as system events and actions.

    In the file en-US.xml I see that if you go to edit the lines that I want to translate in my language, for ejemeplo

    <string September id="-22"> angle layout </ string>

    <string id="-23"> September layer angle </ string>

    <string id="-25"> Go to layout (by name) </ string>

    But as much as the change does not work. In Construct does not change anything. However some modifications to the interface if the translation works. Someone could clarify me as I change the language, thanks.

  • 15 posts