dop2000's Recent Forum Activity

  • Also, do not use 'wait 4 seconds' before loading AJAX data, as the contents of AJAX.lastData may have changed by the time the wait ends. (if you make several AJAX calls)

  • or trying to add a new instance variable to the food family? I tried that but then when I go to add it as an action it won't appear as an option.

    Yes, these should be instance variables defined on the family. They will be accessible on the family itself and on all its members. Say, you can use Food.burpAmount, or you can use Food_Cookie.burpAmount

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Create a function, call it only when HungryScore is changed, and put all checks inside the function. This way they will not run on every tick! And you will have a single event where all changes to the HungryScore are handled, not a hundred of events all over the project, which will make debugging a lot easier.

    This is just an example of what it may look like, don't copy it to your project:

  • This is what I'm trying to explain to you - when an event runs on every tick (the one highlighted on your screenshot), all its actions are repeated 60 or more times per second! That's why your animation is constantly restarted.

    And never use "wait" action in such events! Because all actions after the "wait" will continue repeating many-many times even after the event is no longer running, resetting the variable.

  • Yeah, many of the events could be optimized with families and functions. And you still have way too many events that run on every tick. It must be a nightmare to debug.

    Here is how you can optimize eating event - add all food sprites to a family. Move DragAndDrop behavior to the family level. Add burpAmount and fartAmount variables to the family. You can specify different values for each food type in these variables.

    Then you could have a single event for eating. Notice that the BURP and FART checks are nested under the main event and are not performed on every tick.

  • What do you mean by "replace the existing teams.txt"? You can't physically replace a project file with some other file in runtime.

    What you can do is ignore the project file and load the data from the file provided by user.

    If you want to save the data between sessions, you will need to save the list of teams (either from the project or provided by the player), say, in Local Storage. Then the logic could be something like this:

    On start of the game:
    
     If Local Storage has saved data -> Load teams from Local Storage
     Else: 
     ...Ask if the player wants to use standard teams
     ...If yes -> Load from teams.txt
     ...Else -> show FileChooser dialogue and load from selected file
    
    
    At the end of the session/level -> Save current teams in Local Storage
    
  • Could it be with an extra behavior and control the x position at all times?

    I'm not sure what you mean. Could you share your project file or a screenshot of events?

  • All your events run on every tick (repeated 60 times per second or even more). What's even worse is that you are using "Wait" action in such events. This means that the delayed actions will continue to run for 1 second even after the condition has become false, changing variables, stopping audio, changing animations. This will very likely break your game!

    All these checks can and should be performed in the same event where the hungryScore is changed - simply add sub-events. Then you won't even need that boolean.

    // Main event
    Character on collision with Food: Subtract 1 from hungryScore
    
     // Sub-events
     If hungryScore=1 : do this
     Else If hungryScore=2 : do some other thing
     Else If hungryScore=3 : do something else
    
  • FileChooser Click action only emulates a click on this object. You still need to wait for the user to pick the file they want to load.

    So you can't put AJAX Request immediately after that. You need to use "On changed" trigger and request the selected FileURL, not "teams.txt":

  • Hi Ashley, Thanks for considering this!

    I found this project:

    github.com/actions/stale

    If I understand correctly, by setting days-before-stale=365 and ignore-updates=true, all issues would be unconditionally marked as stale after a year. And it’s possible to auto-close stale issues as well.

    However, I'm still unclear about your approach to popular suggestions with lots of votes. Are you reviewing them regularly throughout the year, or only before the annual purge/archiving in January? What should people do if their idea has received lots of votes but ends up being closed after a year without any feedback from you?

  • Thanks for the reply, but I don't want a mirrored depending on rotation

    It won't be if you use Sprite.Pathfinding.MovingAngle expression.

  • No, you need this API:

    github.com/PsychoGoldfishNG/NewgroundsIO-JS

    Download NewgroundsIO.min.js script from Dist folder and add it to the project. Set its purpose to "Import for events". Then you will be able to use its methods. For example:

    	NGIO.init("39685:NJ1KkPGb","qsqKxz5dJouIkUNe3NBppQ==", {
    		version: "1.0.0",
    		checkHostLicense: true,
    		autoLogNewView: true,
    		preloadMedals: true,
    		preloadScoreBoards: true,
    		preloadSaveSlots: true,
    		debugMode: false
    	});
    	
    	NGIO.unlockMedal("name");
dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 255 followers

Connect with dop2000

Trophy Case

  • 8-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x13
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

28/44
How to earn trophies