dop2000's Forum Posts

  • Just type it in the "Value" line

    While you are there, look for a semi-transparent window called "Objects with expressions", click it and select System - you'll find lots of interesting expressions and properties, including that Max function.

  • Then don't do "Add 1 to LevelProgress" at the end of each level.

    Instead do something like this:

    If LevelName="Level1"  -> set LevelProgress to Max(1, LevelProgress)
    If LevelName="Level2"  -> set LevelProgress to Max(2, LevelProgress)
    If LevelName="Level3"  -> set LevelProgress to Max(3, LevelProgress)
    [/code:31prey72]
    
    So if user reached level 3 and then decided to replay level 1, LevelProgress will remain 3 (because of the Max function).
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Swipe and double finger tap are both gestures, which means there also will be lags if you use them..

  • Yes, there is a slight lag with tap, because this event triggers after the finger was lifted off the screen.

    But this is the only way to do what you want.

    You can't jump at Touch Start event because you can't predict if player will be doing a short touch or a long hold.

  • Construct 2 detects collisions using collision polygons.

    Check collision polygon of your Enemy sprite (on all frames) and of that object that should stop it.

    If this doesn't help, please share your capx file.

  • Just use gestures instead of basic touch events.

  • See my screenshot above how you check which layout is active!

    System->Compare two values -> LayoutName equals <your layout name>

    Instead of having separate variable for each level (Level1, Level2, Leve3 etc), just make one global variable LevelProgress.

    Add 1 after completion of each level to it.

    In your LevelMap check the value of LevelProgress and unlock next level icon. For example if LevelProgress=2, then level 3 is unlocked.

  • Another thing I noticed - you have almost identical event sheets for levels 1 and 2.

    You can delete EventLevel2, and set the same event sheet for both layouts.

    If you need to do something different for each level, just check which layout is active:

  • No problem!

    Or you can do this:

    This means - if sound is playing, stop it. And then play the sound from the beginning.

    (oops, forgot to delete the old line with empty "" tag)

  • Here you go:

    I noticed you never use sub-events in your game. This is a sub-event, it's only executed if the parent event is executed (if Player is on the Floor)

  • Sure, if it's not too big

    my email: <censored>

  • No, it doesn't check if the player is jumping or not, it checks if the sound is playing.

    Again, I don't know how and when you check if the jump is made and decide to play the sound.

    Could you share the screenshot of your entire event where you play you jumping sound?

  • I meant replace your existing action (Audio->Play jumping sound) with those 2 lines.

    This is what you wanted, isn't it?

    [quote:94xz1gbr]Don't play jump-sound if the jump-sound is already playing.

    I didn't see your code and don't know where you play your sound. I'm guessing it's inside some event, maybe On collision with a floor, or On key "Up" pressed. So insert my 2 lines inside that event.

  • KeeghanM

    That's what I was thinking too, but still a bit worried

    I just made a little test - replaced Text object with SpriteFont object in an event (manually in C2), and then compared xml files - sid tag remained the same.

    So yeah, it should be safe to change objects in xml.