Chris PlaysOldGames's Recent Forum Activity

  • The easiest timer I have seen is to use system-every 1 seconds-add 1 (to global time variable). So for a count down you could set time variable to your amount and use subtract 1 every 1 second.

    In your every 1 second event just have it add 1 (or 3,5,10.. whatever looks right) to width of your progress bar sprite.

  • Also, have you tried giving the object with the animation the "persistent" behavior?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I also came here from Stencyl... and to Stencyl from Game Maker... thankfully I ended up here as Construct2 "programming" is by far the easiest for how my mind seems to work.

    The key to Construct2 is to embrace its lack of limitations in designing, think creatively... ie. it doesn't need a special object like regions in Stencyl. Construct allows you to easily make your own, simply create a sprite by d-clicking canvas, selecting new sprite, dump paint on it, check "invisible" to yes, and change opacity on main layout design screen to like 20-30 to remind you its a trigger (and so you can see through it). Now you can place this in your doorway, exit point, etc and then use events like On-collision or Is-overlapping to trigger your own region changes to new layouts or even to previously hidden layers in the same layout...

  • When you ctl drag off an object it creates an instance of that object with all behaviors, instance variables, and settings inside at THAT moment. The key is to put your original in a specific location off-screen and set it up exactly like you want ALL of instances of its type to behave. Then ctl drag them off. The nice thing is, if you later want a cloned instance to behave in a different manner you can manually change its settings.

  • Simple but effective... one thing I love about Construct2 (and programming in general), there are a dozen or more ways to approach any problem.

  • Try moving the checkpoint check toward end of load events or make a second "verifying" event that simply repeats coordinates input just prior to end.

    I would be happy to look at your capx if you like, maybe another set of eyes might spot something weird goings on. If you don't want to link to it here you can always PM me a dropbox link if you like.

  • My guess is its an unintended operation in your coding.. aka bug.

    Have you tried moving the events that grabs the coordinates from the variables as close to the beginning of your restart routine as possible so as to minimize any interference,

    You could also try putting 2 text objects on the screen and having them display cpX and cpY every tick.. this way you can debug what the data is when its acting funny and maybe see where its happening.

    Lastly, if all else fails, don't use coordinates. Use the actual checkpoints to spawn the player via a variable for each toggled to On or Off (ie. current one is On, rest Off) and for example if checkPoint3=1 then CheckPoint3-SpawnInstance_Player or whatever... it would mean more coding but if you just can't solve your original problem it might work-around.

  • Is it just a visual timer or are you using it to keep time?

    Without recording the current frame and starting animation from there on new layout I am not sure it can be done this way.

    Not sure what your project entails and why your changing layouts so often, but have you considered using layers set to visible/invisible instead of layouts so the events continue in the current layout?

  • Is this what you mean?

    https://drive.google.com/open?id=0Bx-ufu2WID53SlMzY1VNME0wQkk (click the download arrow in upper right corner of screen)

  • Here is the coding, its pretty simple and straight forward. Ignore the global variable at top... its not used in this method.

    Pic:

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

  • [quote:2r2e5914]Let's say: the wait is tirggered (2 seconds) and then the enemy is killed triggering the DIE animation. then, as the wait was already triggered in different conditions the attack will play even when the enemy is in his dying animation. how can I solve this?

    Yeah that would be a problem.

    Only easy way I see around that while still using Wait this way would be to immediately "kill" destroy the instance when enemy is killed and instantly spawn an animation placeholder at its X,Y and run death animation off it.

  • Hmm why not just use the built in Wait action?

    As the event sheet is run the bots actions will pause at the Wait action for its duration then run rest of actions below (in the bots event.. all events on sheet run basically instantly 60 times a second) which will be the jump attack... use an instance variable to restart its conditions.

Chris PlaysOldGames's avatar

Chris PlaysOldGames

Member since 22 Aug, 2014

Twitter
Chris PlaysOldGames has 1 followers

Trophy Case

  • 10-Year Club
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

12/44
How to earn trophies