Chris PlaysOldGames's Recent Forum Activity

  • The object only needs to be on "a" layout somewhere in the project at the start of the initial layout. Once the start layout is loaded all sprite objects can be deleted and still be accessible via spawn. I use two methods myself. One for static sprites where I put them all in a family and on-start of layout destroy the family. Second are things that start with bullet or movement behaviors enabled. Sometimes I simply put them behind a killer sprite and have an on-overlap with killer sprite destroy them after start.

    That said, I don't believe your lag is from your object creation... unless its massive. You may need to post your .capx to get to the root.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • [quote:2m58egmw]chrisinfinger: Where do i find the .capx file? do i need to buy license?

    The capx is in the left column beside the tutorial.. its under heading "Tutorial Downloads". Not sure if it was made using objects requiring pro license though.

  • Or you can do it the more complicated way...

    https://www.scirra.com/tutorials/5359/non-overlapping-ai-for-top-down-games

  • I tried to recreate and it worked for me. I even tried to break it so it wouldn't... and couldn't. Not sure what you did.

  • Arrays would be the much cleaner and shorter code way to do it.. and you will only help yourself by learning them.

    You can do it using just variable as I pointed out above but your code will be 3x as long.

  • Good local storage tutorial. It is the part the other tutorial seems to be out of date on (it's using old webstorage).

    https://www.scirra.com/tutorials/1461/how-to-use-the-localstorage-plugin

  • Try setting the group inactive in a start of layout event action. It may be starting activated.

    Another simpler way to do this is instead of putting it in a group to use the variable as a condition in your spawn event.

    [System>Group "UFOSpawn" >Create object UFO1 on Layer 1 at random]

    [UFOSpawn<10]

    (nested)[blank condition]

    (nested)[Else] > Create object UFO2 on Layer 1 at random]

  • I assume this is for single player offline and not via scirra arcade.

    You will need to learn how to use local storage first, it is not too complex.

    You will need a variable to store in local storage that tracks how many times player "won" and increments each time by one... ie. timesScored=0.. (win) timesScored=1.

    You will then need to make a variable for each score you want stored. You can use global variables for this or make a global sprite "brain" with instance variable inside (1 for each score stored).

    In your win (or scored) events you will need to condition out timesScored=0 TextScore1 set text "Score: "&Score1var... etc

    If you want incremental (highs to lowest) you will need to use conditions prior to displaying to check if score1 is > score2 etc.

    Or for advanced users, store them in an array.. or even dictionary.. or.. many ways..

  • Don't see anything wrong in code... is your letter2 on the same layer as env? You might need to post link to .capx

  • As mentioned as well, you could use image points and test if their x,y coords overlap other sprite.

  • You would need to use image points x,y or overlap or pin an invisible sprite to the bottom and use it as your on overlap condition trigger.

  • I didn't want to confuse him.. but yes families and putting all the "types" as animations or even frames (if static) into a single sprite would be more efficient.

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