dop2000's Forum Posts

  • 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");
  • Event #3 is wrong, this is not how you use raycasting. Have you seen the official example?

    Instead of the overlapping check you need to use "ray intersected" condition. And set the laser width to LineOfSight.hitdistance

  • You can compare Sprite.Pathfinding.MovingAngle

    + System: Sprite.Pathfinding.MovingAngle is between -90 and 90 degrees
    -> Sprite: Set not mirrored
    
    + System: Else
    -> Sprite: Set mirrored
    
    
  • You can add 10*60*1000 to the clock variable every 1 second - this will equal to 10 minutes in milliseconds.

    Then convert that value to days/hours/minutes using Date expressions. For example Date.GetHours(clockVar) will return the number of hours.

    See the official example for the Date plugin.

  • howtoconstructdemos.com/using-a-sprite-to-invoke-open-file-dialog-and-a-workaround-for-filechooser-bug-c3p

    Use "AJAX Request URL" action. Also I really recommend studying the documentation and a few tutorials. Many of the questions you ask are pretty basic.

    construct.net/en/make-games/manuals/construct-3/plugin-reference/ajax

  • Can you post a screenshot? That wall of text is impossible to understand.

    You probably need Date plugin:

    construct.net/en/make-games/manuals/construct-3/plugin-reference/date

    Using "every X seconds" to track hours and even days is a very bad idea.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can use FileChooser object.

    + FileChooser: On changed
    -> AJAX: Request FileChooser.FileURLAt(0) (tag "tag")