CinderFlurry's Forum Posts

  • When I start a specific layout, I want to check if a global variable is set to "alert", which will determine if a notification is shown or not.

    The problem is, there's a lot of these variables, 100 of them.

    I know a really long way to check all of them, but I'm wondering if anyone knows a smarter, quicker way to do it? My long and winded way: imgur.com/AIRTsYT

    Just multiply that picture by 100 and that'll be my future if there's not a quicker way to do it

    (Sorry for all the edits, I can't figure out this new forum just yet)

  • I don't think I've heard of that, what do you mean?

  • I'm trying to fix a monster bug in my game, and searching my events using keywords would make things much easier. The problem is that it doesn't seem to accept any complicated searches.

    Say I want to search for an event that says;

    'On collision with [...] - Player | Set Angle 0'

    I'd search 'Player Set Angle', but the search shows up blank. Is there a proper way to search something like this? I'd love an answer or some tips for searching stuff better.

  • I want to make the background get sucked into a single point as if all the color is going down a drain, is there an effect or plugin for this?

    Think of oil going down a bath drain, revealing the white bathtub beneath

  • When an object is clicked it usually highlights it with a blue border but for some reason that's not happening anymore. The weirdest thing is that it's only not working on one specific layout, it works fine on other layouts.

    I'm pretty sure I just pushed a button or something by accident, but if it helps I have the most recent patch that came out earlier today.

  • Set the global time scale to 0.

    then give one of the menu objects their own timescale.

    And use this object's timescale for anything you want moving in the menu.

    I'm not sure if that's the official way to do it , but it is they way I have done it and it works fine.

    Genius. I was thinking about it backwards the whole time, thank you so much. This method will stick with me forever

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • To pause the game I have a family of objects that I pause the timescale of. The reason I don't set the game's timescale to 0 is because I wouldn't be able to navigate the menu properly with arrow keys since the game would be frozen. But I run into an unfortunate problem as a result of this method... 'Every X Second' events continue since they're system events, not object events...

    If the mouse is held down, every 2 seconds the player will spawn a bullet. It works fine until I pause! It won't continue shooting bullets during pause, but the 'Every X Second' event will continue counting down - thus the player will shoot the moment you unpause as long as your mouse button is held down. This is incredibly game-breaking because it allows the player to shoot more bullets than they should..

    So for example, if the player spawns a bullet, the system will start the 'Every 2 seconds' event and start counting down. The next bullet shouldn't spawn until 2 seconds later. But when you pause, the game still counts down... If you wait 2 seconds, you'll be able to unpause and shoot again immediately.

    I tried to get around this by using timers... Since timers are an object behavior, if the object's timescale is set to 0, the timer will pause as well.

    If the mouse is held down, on Timer (DPS) finished, spawn bullet. ... Since the timer only has an 'on timer finished' event, the player is required to have their mouse down during the time the timer finishes in order to spawn another bullet. If the Timer finishes and the player doesn't have their mouse button held down, you can never spawn a bullet ever again, so this method won't work.

    Does anyone have a work-around? To be clear, I don't want to set the game's timescale to 0 because that freezes the menu, making it unsuable.

    Thanks in advance!

  • How do I make an event repeat itself when it has finished?

    The 'repeat' action in Construct 2 repeats all at the same time, whereas I want it to repeat AFTER it's cycled through each part of the event. Quick example:

    Say: Hello

    Say: Goodbye

    ((repeat))

    Hello

    Goodbye

    Hello

    Goodbye

    Hello

    Goodbye

    I hope that makes sense!

  • Doesn't work for me... Here's what happens:

    When the first MovingObject spawns it is assigned (for example) path_number = 1 and moves along the path beautifully.

    However, a second later when another MovingObject spawns and is assigned the same path_number (path_number = 1), it moves along the path slowly and doesn't turn as sharply - it seems to me that it's continuously finding a path, moving, finding a path, moving, finding a path, moving etc.

    If any MovingObject spawns and is assigned with a path_number that isn't the same as the one previously spawned, they will all stop moving. This is infuriating to me :// These are the only events that influence the MovingObject so there's no conflict...

  • Yeah don't do that. I was talking about creating obstacles to block paths so the player has to go a different way. You said you tried this, but you were walking through the obstacles. It's because the player cannot see them, you need to regenerate the obstacle path at the point of creating the obstacles. The player will then find a new path as the previous ways will be blocked.

    Ah, I think you've misunderstood - it's not the player who's pathfinding, it's an object, also I said the issue was that I don't want the player to be stuck on the obstacles when made solid for objects that pathfind

    I think you should check if you have added a Solid behavior to your obstacles and make sure Solids are assigned as obstacles in the Pathfinding behavior.

    The random numbers that are generated will determine witch obstacle's solid behavior will be turn from Inactive to Active.

    There is something you can do :

    - put obstacles on your stage

    - design different (let's say, 5) possible paths that are determined by a different combinaison of obstacles. Put the corresponding set of obstacles in different families named (for exemple) pathObstacle1, pathObstacle2, pathObstacle3...

    - for every moving object, before path is calculated, select a random family and put it as an obstacle in the Pathfinding behavior

    - calculate path

    Should be something like that :

    + System: For each MovingObject

    -> MovingObject: Add Pathfinding obstacle Obstacle(random(1,5))

    -> MovingObject: Find path to (targetx, targety)

    There is no way to add a random obstacle in Construct 2, you need to select a single family/object.

    I tried to work around it by assigning a variable to the moving object when it's created and having the path be set for the object depending on that variable, but that creates a myriad of issues...

    Here's what I've done:

    +System: On MovingObject Created

    ->MovingObject: Set path_number to round(random(1,6))

    +System: For each MovingObject

    ->MovingObject: On path_number = 1

    -->MovingObject: Add Pathfinding Obstacle: path_obstacles1

    -->MovingObject: Add Pathfinding Obstacle: tilemap_walls

    -->MovingObject: Regenerate Pathfinding Obstacle Map

    -->System: Wait 1 seconds

    -->MovingObject: Find path to (goal.x, goal.y)

    +System: For each MovingObject

    ->MovingObject: On path_number = 2

    -->MovingObject: Add Pathfinding Obstacle: path_obstacles2

    -->MovingObject: Add Pathfinding Obstacle: tilemap_walls

    -->MovingObject: Regenerate Pathfinding Obstacle Map

    -->System: Wait 1 seconds

    -->MovingObject: Find path to (goal.x, goal.y)

    etc.

    Any ideas on what I'm doing wrong?

  • Who is that in response to? Yes it would be but nobody suggested to do that.

    Sorry, it was to Laurent - they said:

    Just disable obstacles once path is calculated.

    Sequence is :

    • Activate random set of obstacle

    ** - regenerate obstacle map **

    • calculate path
    • deactivate set of obstacle
    • move along path

    In the manual it states that doing this is very CPU intensive

    Edited for clarification

  • Isn't regenerating the obstacle map for a new object every second going to be incredibly CPU intensive?

  • I think you should check if you have added a Solid behavior to your obstacles and make sure Solids are assigned as obstacles in the Pathfinding behavior.

    The random numbers that are generated will determine witch obstacle's solid behavior will be turn from Inactive to Active.

    There is something you can do :

    - put obstacles on your stage

    - design different (let's say, 5) possible paths that are determined by a different combinaison of obstacles. Put the corresponding set of obstacles in different families named (for exemple) pathObstacle1, pathObstacle2, pathObstacle3...

    - for every moving object, before path is calculated, select a random family and put it as an obstacle in the Pathfinding behavior

    - calculate path

    Should be something like that :

    + System: For each MovingObject

    -> MovingObject: Add Pathfinding obstacle Obstacle(random(1,5))

    -> MovingObject: Find path to (targetx, targety)

    The problem with making obstacles solid is that then the player can't get past those obstacles - also the walls tilemap (which is solid), when added as an obstacle after creation, doesn't work either and the object paths right through it

  • I was thinking of something :

    - Put on your scene a few invisible obstacles that you can activate/desactivate.

    - Every time an object has to find its path, chose randomly a random number of obstacles to activate. This will create for every object a different path to choose from. One path is calculated, disable active obstacle and apply the same process to the next object

    - Of course, you'll have to place your invisible obstacles on stage so that they won't create dead end where an object can be stuck.

    I didn't give it a try but this may be worth trying

    Having trouble doing this... After assigning a round(random) number to the pathfinding object on creation, I add obstacles to it depending on what number it was assigned and then find a path. After finding the path it just goes straight through everything toward the destination :/ Any ideas?

  • bump ^^ !