treeves3's Recent Forum Activity

  • YES! Thank you 99Instances2Go and TELLES0808! You both nailed exactly the kind of thing I was after in somewhat different ways! I knew there had to be a more elegant method, but I'm still very new to Construct 2, so you both helped a lot! Happy Holidays!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • For those who do not wish to download the example .capx, here is the layout and code...

    Method 1:

    Method 2:

    Again, it's important for the project to find a method that does NOT try to combine multiple data fields into one text field. Thank you!

  • I do understand you can combine the information in this example simply in one text field, however there is a reason why I need to have the text information in separate fields. I posted this as a quick example only. In the actual project, there are multiple icons interspersed and aligned with the individual text fields, so just dumping everything together isn't what I'm looking for. But again, thank you for your suggestion, it just doesn't quite address what I'm trying to accomplish.

  • Thank you both for your comments, but it's not quite what I'm after. I've put together a quick .capx to demonstrate the issue...

    https://www.dropbox.com/s/s4mucsgtjlil5 ... .capx?dl=0

    The first layout demonstrates one method, and the second layout demonstrates another method. Both work, but seem cumbersome. While there are only three text labels each, it's not a big deal and either method can populate the information. But if there are a lot of text objects per sprite (along with multiple player objects, enemy objects, NPC objects, etc.), then the coding to specify each text field becomes highly tedious.

    Perhaps there is no better way to populate similar data in similar text objects, but I just keep thinking there has got to be a cleaner method that I'm missing.

  • I've run across a problem that I've developed a brute force solution to, but have to believe there is a simpler way. While my project is too convoluted at this point to post, the basic concepts can be easily described and recreated...

    Step 1) Create 2 sprite objects.

    Step 2) Add them to a Family called Characters

    Step 3) Give Characters a number of Instance Variables (Type, Name, Armor, Weapon, Shield, Strength, Dexterity, so on...)

    Step 4) Assign different values to each object, for example: Obj1.Type = "Player", Obj2.Type = "Enemy", Obj1.Name = "Doug the Invincible Conqueror" Obj2.Name = "Misfit Toy", etc.

    Step 5) Create a text object for each Instance Variable in Characters. (Example: txtType, txtName, txtArmor, etc.)

    The challenge is then displaying BOTH the player instance variables AND the Enemy instance variables at the same time without having to recreate individual text objects for each type, which is the brute force method I've got working now. In other words, rather than txtType, txtName, txtArmor, etc., I have txtPlayerType, txtPlayerName, txtPlayerArmor,... AND txtEnemyType, txtEnemyName, txtEnemyArmor,...

    What I would like to do, but haven't found a way, is to have some routine which uses instances of the text objects themselves...

    1) Checks the Character.Type.

    2) IF "Player", use txtType(0), txtName(0), txtArmor(0), etc.

    3) ELSE, use txtType(1), txtName(1), txtArmor(1), etc.

    Obviously, with a lot of Character variables to display for each object, the brute force method creates long and tedious code. But I can't seem to tell the engine to use Instance 0 for all text objects if Character.Type = "Player", otherwise use Instance 1 for all text objects.

    Any ideas would be appreciated!

  • Construct 2 froze on me too when trying to save. I created a new caproj and had essentially two sprites. I gave one of the sprites an Instance Variable called GridID and set it to 1. I then copied this 8 times and set the other instance variables to 2-9 respectively. When I tried to save, it just looped endlessly until I killed Construct 2 in task manager. Unfortunately, from what I've read, the Dev's will never fix this problem because they apparently require a capx in order to open a ticket... but the problem doesn't occur when I try the exact same steps in a capx project, only a caproj. Very frustrating.

treeves3's avatar

treeves3

Member since 26 May, 2016

None one is following treeves3 yet!

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies