Chris PlaysOldGames's Forum Posts

  • I was able to get it to work using platformer enable/disable.

    I made a keyboard event of any-key-pressed and set action 1 as sprite 2 platformer disabled, then a wait of 0.25, then a sprite 2 platformer enabled.

    I am not sure what your trying to do exactly but it seemed to work like you described. You could change the any-key-pressed to whatever trigger you needed or set it up for each separate keypress.

  • The easiest way is to have a variable set when your condition is met (ie. gameover=1), then use system set timescale: value.

    gameover=true

    [System:Compare variable (gameover=1):]

    System Set TImescale 50

    Wait 1

    System Set Timescale 40

    Etc

    Etc

    Or better yet, make a function that reduces a Timescale variable by 1 each .1 seconds and then simply call the function when gameover=1 and set timescale to the timescale variable so it grinds to a smooth stop. This would allow you to use a compare on the timescale variable as well so when timescaleVar=0 trigger GAME OVER.

  • Without variables! The madness!

    Seems to me you would need variable singular to track checkpoints plural...

  • Not sure exactly what your trying to do with the exact size but you can grab them from their instance variable (spritename.Height or spritename.Width)...

  • The easier thing to do would be make a simple function that sets a level variable base on experience level and let the experience variable go as high as it wants...

    Ie. countEXP goes up as experience goes up and has no cap. The function compares countEXP and sets level variable based on countEXP value using a case type set up: countEXP <100 level=1; countEXP >100 but <200 level=2: countEXP >200 but <300 level=3: etc.

    Then your main events can call this function anytime they need current level.

  • Have you tried not updating the bars width until after you have adjusted the value?

  • Local and Webstorage are explained here in a tutorial I did a while back.. maybe it will help.

    https://www.scirra.com/tutorials/1152/introduction-to-webstorage-simplified

  • To put something in front or back or just to trick a sense of depth in 2D you would use Layers.

  • Why are you doing it every tick?

    If the conditions are met simply add 2 to STR global... once.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Like Alextro said: pinning is probably the easiest way to achieve the result your after. On your main player sprite assign an image point in the sprite editor for each node upgrades will affix too, make sure to copy to all frames if your player sprite animates. You will need Boolean variables to track whether the player has purchased an upgrade or not and default them all to false. Now whenever you spawn your player you will check all variables and for each true one you will spawn the appropriate upgrade to the corresponding image point and then pin it using position AND angle event.

    In my space shooter linked in my Sig I use a slightly different approach. The player is never "spawned" he is merely set to visible or invisible (and vulnerable/invulnerable) when appropriate and all the weapon systems are all pinned during the On-start event and set visible/invisible by a pretty simple variable driven event. My avatar is the ship with all upgrades visible.

  • [quote:5aogo2ct]Hey everybody I'm having the same problem with the bullets I followed step by step what wrote but I'm having difficulties finding this :

    Add a second condition to Mouse click fire bullet (right click on, above or below the little green arrow on left side of condition space and select add-new condition)

    that condition will be hasFired=false.

    Is it me or there is something wrong?

    What the part in parenthesis is explaining is how to add a second condition to an existing condition, you right click where the tiny arrow is to the left of the first condition but still inside the condition box and the drop down window will easily allow you to add another condition to the existing one... you could also just make another and drag-drop it inside first one, or several other ways...

    The hasFired=false is a variable you made (it could be named anything) you add it to condition using System-compare variable for globals or Sprite-compare instance variable for instance variables.

  • Add condition to on created that uses an inverted is overlapping... then it will keep creating but only place if not overlapping.

  • every x second is under system events.. the cog wheel icon. It has to be a primary or secondary event, you won't find it under actions or not primary/secondary events.

    I think from your post what your actually wanting is for the player to fire a single bullet by clicking and have to reclick for each shot... however you don't want them to be able to do it quicker than once per second... ?

    If that is the case you will want to use a Boolean instance variable on your player, lets call it "hasFired=false". Now move your current Wait-1 to beneath the fire bullet action and add an action "hasFired=true" before it and a hasFired=false after the Wait.

    On mouse click fire bullet

    hasFired=true

    Wait 1 second

    hasFired=false

    Add a second condition to Mouse click fire bullet (right click on,above or below the little green arrow on left side of condition space and select add-new condition)

    that condition will be hasFired=false.

    Now when the game starts the player can shoot by pressing mouse button because "hasFired" is false by default but once they click button and fire a bullet the flag hasFired will show true and clicking will not do anything but once a second passes it will work again because hasFired will again be false.

  • [quote:7h89sydn] I wanted to press up at the just goes up to the next level without having to hold up, BUT nevermind that

    Yeah I wasn't sure exactly what you envisioned. I will play around with a more snappy method. How many platforms will there be?

    Here is the variable version where the point giving block is not destroyed, its very simple.

    https://drive.google.com/open?id=0Bx-ufu2WID53dTVaVDUtclJVUzA