Gearworkdragon's Forum Posts

  • How do you want to do the health ? sprite or variable text.

    If you are doing Sprite based for health then just make animation of 5 frame of what ever image you want to use but maker sure its like this for frame 5 ++++ like as in four of the same thing and on frame 4 +++ make three of the same thing and again for 3 and 2 but leave the last one blank all frame must have the same size frame. and have it start on the sprite's property on frame 5. And your code will be something like this Player collide with enemy -> on health animation set frame number to Self.current frame-1. (what this does is that when you hit your enemy then your health animation since it is set on 5 it will be at 4 because Current frame is at 5 and we added in to subtract 1 which is 4.

    If you are doing variable based then on player sprite add in a variable to the player and name it health and set it to 100 this is going to be your max health point. Next you want to code in the player collide with enemy and then subtract from player variable health by 10. And this will give you a health of 90 after first and then again at 80 and so on.

    Now for the collection of coins you will want to make a global variable and call it coin and make sure that it is number and it's number is at 0, and not on text variant. next you want to do player collide on coin to system add to global variable coin + 1

    If you wish to view the coin or as a score then its just a matter of adding in a textbox object and coding in this Every tick-> textbox object , set text to the global variable name Coins. no " " do not use that.

    and if falling down then you want to add in a sprite and lets call it falling check. and do this code if player overlap the sprite " fallingcheck" then system go to layout "main menu"

    This is just one easy example now everyone has their own takes of how they want their game to function and take in to account that not every game uses the same thing. The best way to know what you want is to play other game and figure out how they did it and read up tutorials section for more.

    Oh and learn to make mistakes because if you dont you will not figure out how to solve debug issue.

    If you have any more question feel free to message me, I'll try to help as much as I can.

  • have a function to delete the object and recreate them or you can use array. Array is best used when data is being use as a position. I normally just use a dictionary to store data. but its the array that can position them with easy check out the scrollable inventory by katala in using a dictionary with his array.

    But yeah try doing the same thing with array you might have better luck there. The dictionary is horrible at positioning any thing. I had to rewrite my inventory because i couldnt get any positioning right. Just use the dictionary as a data holder to load into array for positional.

    because the array has a push pop and delete that does exactly what you want.

  • Hey i Solve my problem If you want to know here my capx with the updated https://www.dropbox.com/s/3updlb7i15dx3 ... .capx?dl=1

  • Could you explain that a little more ? like how would that work and in what way ? and Im already experimenting a get Y condition that actually halfway working. But the thing is this scroll list have to be updated every time this layout is made which is why im using the Jrpg inventory example because his code recreate the scroll on the fly and its actually so perfect for what i need just need the text to disappear when not on menu.

    Here is the capx or the modified version if you want to take a crack at it https://www.dropbox.com/s/3updlb7i15dx3 ... .capx?dl=1 It will autodownload just click one time

  • Update: Ok this is super weird when i went to do a test run of a toggle Boolean on overlap if there is no scrolling then it work fine but once you start to scroll past the overlap its just quit working. I'm so confuse. I have check all the event but there isn't any that locks visibility or preventing it since I'm using a function to be call on press keyboard of moving the scroll inventory.

  • Like the title says How do I do that with this guy example https://www.scirra.com/tutorials/1145/j ... -item-list

    I know that using Overlapping and not overlaping sprite with a For each event onto the text works for one time but when you go to actual scrolling the text past the window layout it just doesnt want to repeat checking like its stuck on a once and never to be seen again lol.

    Any chance there a way to make it repeat the check when scroll is moved ? cause all the example I have found are using one layout and a sprite for hiding the text behind them rather then making text invisible cause let say if you want to make the list a drag n drop on the screen but cant afford to keep re drawing extra sprite crap all over the place and have to destroy each one.

    If you want to know this is just for a battle scene so just making the textbox invisible outside of a menu window Not hiding behind a sprite or outside of a layout would be great

  • Ok i figure out that if you set any sprite to global It will place itself to the top of the layout's layer. Which happened to be my item layer for using which would make alot of sense. Also this open up a cool feature for UI. Such as this Ive made so many layer on a UI layout that it was now in the 16 layer range.

    So i used the global sprite and added a layer note this layer need to be not layer. Called it Top and left it alone and used family for specific sprite range to turn them visible or not.

    So really all i had to do was add an event for the UI and layer to turn it off once and for all so that it still exist there, but it isnt going to be used. I highly recommend to use this trick instead of using multiple ui layers.

  • Ok new update There something wrong with my game Ive recently tested out an example of the save and load on a new project i cannot get the bug to reproduce.

    If anyone can take a look at what it could be the possible cause of it because apparently I cannot get it to overwrite the old save in it. Im losing my hair over this little ordeal ? and if you guys cant get the bug to produce then Idk what to do.

    https://www.dropbox.com/s/wzyv39sn5prhq ... .capx?dl=1

    It will auto download as soon as you click so just click once. The code for the save n load is in the UI event sheet.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • When you go to save It will save once....but will not save again or over write and what more is that the only way to fix this god awful problem is to just manually clear save.....Apparently the way that the save function work in this creator is that Once you hit save It save your game state And by game state i mean every Javascript you had loaded to that save.

    So even if you change up the whole thing that load will go back to the exact save spot and Javascripted. I know ive loaded and tried to move my character resave did nothing. And we do need a Clear save function. In some game it allow for clearing all old save files.

  • Oh cool I wished id known that many year ago. I remember having to do the counter by manual as in frame count to change the next number it was crazy.

    But yeah Im having a new problem The save n load works fine For one time and then it start to lose it text ....load buttons.

    Im confuse to why its doing that. If any can find that one.....Why would it work once but then falls apart. here the capx. https://www.dropbox.com/s/wzyv39sn5prhq ... .capx?dl=1 It will auto download. Note: the battle isnt ready yet so dont go testing it lol

    Oh And Id like to ask for input for the music volume if you guy think its too loud ?

    The save n load function is being weird on me. The codes are on Start menu, UI and save time event sheet. and yes I tried to separate them to make easier of finding.

  • hey while the topic is hot How in the world do i delete the save state in teh first place Im testing out the save function and now its stuck with the saved stuff and i cant resave to see the changes or know where in the event that I need to change

  • i love both of you guy example and I will use both in a way but i have to ask what does the Percent sign do in java math ?

  • Such as this if ive been playing for one hour and then hit save id like to see a load and that save slot to show up as save 1 : 00:01:00 as in dd:hh:mm ? I dont think Anyone covered that one yet ?

  • Well I solve the issue with the bag appearing everwhere. I just deleted it and remade it. Although the inventory item was still there so I just slapped a temporary fix of just making that family invisible Even though its not suppose to be on that layout but oh well,

    If anyone can find out that specific fix id hug you a million times

  • Why not add in a loading screen that could be playable until it loads I missed the old interactive loading screen maybe you can do that so that it isnt a boring wait.