rodrigorhardt's Forum Posts

  • Hi,

    Im starting a project of a mobile game based on turn-based actions, very indie, zero 3d action, not even a platform game, just a menu where you send your character to do stuff.

    My question is the following: is there something I should be aware of right now in the beginning? I mean, any plugin, template, baseline format to export, or anything?

    Thank you :)

  • Hi everyone

    Basically, I want to create a one-time-only code that the player could active to reedem some in-game bonus. After someone use the code, it cannot be used by anyone else.

    Any clue on how to do that?

    Thank you in advance :)

  • I got it, thank you so much guys!

  • Hello, guys! Hope you are all doing well.

    I'm working on a "Table RPG" like D&D for mobile app.

    And I'm trying to do the following:

    - a test based on player's atributes. for example:

    1) Player has 3 points on Intelligence attribute

    2) So "3x 10-face" dice should be "rolled".

    3) If the result of each dice is higher than 6, it is a succesful test.

    4) So, I'm trying to generate 3 random round numbers from 1 to 10 simultaneously, and the result of this action should return the numbers of the scucesful tests. Is it possible to do it in a single action and return it to a variable?

    I have no clue on how to do it. Thank you so much for your help and time!

    Wish you all the best :)

  • Hi everyone!

    I want to update the items in my inventory system but instead of configuring all items animations into 30 different sprites, I want to do it with just one. So how can I send actions to the same sprite but applying into an specific one?

    This 30 slots are the same sprite, but if I want to update just the slot 2, how do I do it? How do I identify the slot 2 in the actions?

    (Hope I explained myself) Thank you in advance!! :)

    Tagged:

  • Well, but I use real time based events and time spent offline to update the player progress, so I guess this "save" system for mobile apps would not work properly, right? Also, sorry but it doesn't make much sense that he needs to save the game every time he exits the game to the phone's home screen, like how many times we do that? switching into apps in our phone? I'll for sure forget almost 9 to 10 times to save the game haha.

    I'm still stucked on this and I still don't know what is wrong with my code :/

  • Ok, but I said this is a mobile app, let's say that the player suspend the app and return to the it's homescreen. I need to save it, regardless the layout.. What do you suggest?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I provided all the important events! It's up here, the loading, the text update, the invntory adding item code! And no, everything is loading properly! As I said, the LocalStorageLoading always get the "1" value... :/

  • Also, I adjusted the loading code, and the LocalStorageLoading_I variable always reach the 1 value, except when it's the first time running it.

  • I don't know why, but the images didn't load properly.

    Here is the new code (I excluded the function):

  • I changed a little bit the code to this:

    What is really weird is that it doesn't work at first moment, but if I close the preview, and reopen it, then it works haha that doesn't make any sense to me... I'm obviously missing something here, but what!? I'm stucked into it like 3 weeks haha.

    (Immediately after picking up the item)

    (After closing the preview and reopening it, it works! Zero for the picked item and 2 for the slot 1, which is the uncommon medicine herb item code)

    What's going on here!?

  • Hm, got it. I understand that there is simpler ways to do what I'm trying to do, but still, I don't understand why it's not working the way I structured it! I mean, what's wrong with my code, it should work, doesn't it?

  • Hey Lionz!! Thank you for your response!! :)

    Hm, yes, I did share! It's in the same dictionary as the picked item (3rd image that I shared), and it's "code" is the number 2.

    So, I don't understand why the 'while' loop should not work properly as the 'for' loop, since both of them should find the empty slot.

    Also, ok, I could add the picked item to a global variable, but since it's a mobile app game, any layout suspension will need it to save this global variable. If I start adding global variable for everything, it will be a mess to save all of them, so that's why I use dictionaries and arrays. And I found many posts also recommending it, to use arrays and dictionaries instead of global variables, so I'm confused now! haha

    And sorry, the function thing, I didn't get it, is there any other way I can call the while without using functions? Or should I optimze it somehow?

    thank you again! :))

  • Hi y'all!

    I'm working on an inventory system and for some reason it's not updating the slots. I "pick" a item from other layout, set the key "PickedItem" in a Dictionary as the picked item, then I go back to the inventory and call a while expression to check the next empty slot (the inventory is in an array) and add this picked item there.

    But the problem is that it's not adding the item properly to the first empty slot. Actually it's not adding anywhere, it stays as the "PickedItem", the "PickedItem" slot never empties and the slots remains as 0.

    What is strange is that for some miliseconds, it works as it should: 0 for picked item, 2 in the slot 1 (uncommon medicine herb code), 0 in the slot 2 and slot 3 as well. But after this miliseconds, it gets back to the wrong structure showed bellow on the output image.

    So: what am I doing wrong!?

    Thank you so much for your time and for helping me!!! Really appreciate it :)

    Here is my code:

    Here is my inventory array:

    Here is my item list dictionary: (used to call the picked item code into the slot)

    Here is the Inventory Layout (dummy texts on the bottom to test it):

    Here is the output from the code:

  • Got it, guys!

    But my point is, is too much global variables to save and load everytime, also the arrays and dictionaries is way easier to refer to, where I can find values based on a (x,y) from the matrix.

    Also, my game has no animated layouts, is all based on actions that you call from a menu, so there is no global objects such as the player’s character, or npcs, monsters, etc.

    Question 1: If dictionaries and arrays are not the recommended plug in to use, what should I do?

    Question 2: How can I load an array/dic value twice, as you said AllanR?

    Thank you again! :)