pcprice76's Forum Posts

  • Hi, i'm trying to understand better how to use Load from Json in C2 but i'm a little bit confused by now.

    I understood the general concept and would be able to copy and modify an existing one, but i would not be able to create one from beginning. I would like to understand how is formatted, the meaning of all those "" and so on. Tried to search over the manual and tutorials, but did not find anything. Is there somewhere an explanation of it? Thanks in advance!

  • HI, i tried the plugin without success unfortunately. First tried the demo with rex login data, then also tried to register on firebase. The login fails im both cases

    Error is "auth/popup-closed-by-user"

  • file not found

  • Local storage is for keep values like bestscore, lastuser, etc.

    I think save and load is for this case.

    https://www.youtube.com/results?search_query=save+and+load+construct+2

    I think i'll use Save Game only in test environment, because i noticed some limits. for example, i didn't find a way to check if a savegame exist (but maybe i'm doing something wrong)

    Then i noticed something weird if i close game during a "wait" inside a function...

    I think i'll finally use local storage to save the Array and Character position

  • Yes. i'm trying to use that one. Seem to work

  • mmmh, not sure that save and load feature can be used with Local Storage

    My game should auto-save after every action taken, but the

    'LocalStorage --> On item "autosave" exists' does not seem to work, if Autosave was created with "Save" action...

  • I must thank you both... you gave me great help, thanks!

    Trying now..

  • I'm developing a graphic adventure and now i need to find a way to save the room so when the game starts will not build the level from the beginning each time. I have all the start configuration in an XML file with all the text strings. I should check, at start of layout, if is the first time that game starts and if not, skip first configuration and, instead, loading it from local storage. Wich is the best way to do it?

    Thanks!

  • pcprice76

    There are a bunch of ways to make it do what you want... it depends on how complex your project is. If there is a lot going on, and you want to pause all that and enter a different state, then you would want to put code in different groups and disable groups you don't want running. (that would disable the sprite that creates the m.Glass one, so you don't have to worry about it processing a tap).

    The most simple way is to just make sure the m.Glass sprite is not overlapping the other sprite. I made a quick example of that...

    http://www.rieperts.com/games/forum/Tap.capx

    Hi, sorry for replying you late, but you gave me really good hints!

    I will for sure use the Group disable feature in some parts of the game, i nvere noticed that before :/

    My first idea was to make M.Glass appear beside the touch.x, but i want to solve the issue the same, because it will appear overlapping some other objects.

    I tried now to put another confition (if M.GLASS is not on layout 0) but... is really, strange, it doesn't work even if is correct...

    M.Glass is not on layout and event is not triggering the same.... really weird...

  • pcprice76

    I was dealing with a similar mouse issue last night - I was doing something when the left mouse button was clicked on an object. But I was also doing something while the left button was down in another fuction. Out of curiosity, I put a counter in that button down function, and it was getting called on average 9 times along with the first routine. And that was just a normal short mouse click.

    Things generally happen a lot quicker than you think. I bet C2 thinks your "touch" event happens for quite a few ticks. On the first tick of the touch it creates the m.Glass, then the next tick thinks you are touching the m.Glass. so starts running that code. The 0.01 second delay may not be long enough.

    Another issue I ran into months ago is that a tap on objects that overlap registers as a tap on all of them. So, you need to make a way to disable the first sprite while the m.Glass sprite is visible. Then re-enable it when you destroy the m.Glass one. Making the first sprite invisible will not work - the tap will still be processed for it. you have to disable the events where it processes the tap, or move the sprite off screen, or add conditions that say not to process the tap if the m.Glass sprite is overlapping or visible.

    YES! You got it... my problem is the sum of your two ones.

    I realized that more then one tap was triggered and i think that with WAIT was solved, because after that the M. Glass was showing up normally. The second issue is that clicking on it,it triggered both overlapping sprites, so, at the same time:

    1) Function description, that describes object and destroy sprite m. Glass

    2) Function object select that triggers the tap on underneath object and creates again the M. Glass on it.

    So the M. Glass remain always on top of the object, never being destroyed (or, better, being destroyed and recreated at the same time)

    In this case WAIT is useless because the problem is that TAP takes both objects and triggers 2 functions.

    I could make the M. Glass appear shifted to the side of touch.X but would prefer to find a way to solve this porblem, 'cause i'm sure that can be useful in future..

  • Hi, i have a strange issue. I have a sprite, when you tap on it a new sprite with a magnifying glass should appear on it, clicking on it a text box is created with description and magnifyng glass sprite is destroied. problem is that when you tap, the magnifying glass sprite won't appear because the same tap is triggered for both action, so only text will appear on top...

    I tried to solve adding a 0,01 wait, but then when i click on m. glass, the TAP will be triggered both for that sprite and the one underneath, creating again the m. Glass sprite on it... do not know if i've explained it well (sorry for my bad english...)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You do not have permission to view this post

  • thanks!

  • Hi, something wrong with the links... they point at same file, that is the plugin...

  • ok found it