igorholi's Forum Posts

  • 6 posts
  • Thank you oosyrag, I'll check the file you sent when I get home! Yeah, I'm not looking for the pixel physics, just the map reveal type of thing, that gradual blurred reveal.

    Thanks for the suggestion newt, I've tried some similar things but I never got it to work properly. I'll take a look again. I'm now trying to use arrays and it's been giving me some better results, I'll keep exploring.

    Thanks again, folks!

  • Hi everyone, I'm trying to create a map reveal with a fog of war style but I wanted it to look similar to Noita's (https://www.youtube.com/watch?v=9nXx_1GZclc&t=1407s).

    I'm looking for something that gradually reveals the areas where the player has Line of Sight to, but I want to be able to control the opacity and the time to reveal it depending on how long the player had that are within their Line of Sight, again, like the video above.

    However, I'm talking about a bigger map with a Full HD resolution.

    I've tried different approaches in the past using tilemaps as a mask that shows the tile the player has had line of sight to and using this mask with a destination out effect pasting it to a Drawing Canvas that was initially all black.

    If I use only an object pinned with the destination out effect over the mask it allows for the player to see behind walls if they get close to them, which is not what I'm looking for.

    The test file I've attached doesn't have the blurred effect I'm trying to achieve and it also has issues in performance for bigger maps/layouts, and if the Line of Sight distance is increased (which means that more checks for the tiles are done each cycle). It also pushes the GPU to 80% sometimes.

    Does anyone have any suggestions on different approaches to achieve the type of map reveal I'm going for, let's say, if you were trying to do the same one in the video but for big Full HD maps, without compromising performance?

    https://www.dropbox.com/s/mczodui84t0un2b/MapRevealTest11.c3p?dl=0

  • You do not have permission to view this post

  • You do not have permission to view this post

  • That is probably a good idea, I'll try that as soon as possible to check if it works for my application.

    Thanks again :)

  • First of all, thank you for helping me :)

    Checking in debug mode I now see that the timer did not stop, you were right. I thought it has stopped because my coolbox stops reducing its height.

    I understand your solution and the downsides of it.

    I'm trying to create that "cooldown" effect over a skill in a RPG, I have multiple skill icons and I want to create that effect in every instance of that skill icon when I activate the skill.

    Do you know a better way to do that? Considering that every skill has its own cooldown time as an instance variable.

    P.S. I'm new in Construct.

    P.S. Sorry about my English if something I wrote is not clear, it's not my first language.

  • Hey, this is the current situation:

    (I know I am not stopping the timers right now, I'll deal with that later...)

    With this setup, when I press 1, objects are spawned over my skill icons in position 1. And the cooldown box starts working perfectly.

    When I press 2, the new objects are spawned over the skill icons in position 2 and their timer starts. But the previous boxes (over number 1 icons) stops...

  • Hi there,

    I have an object that spawns multiple times. For each instance, I need to start a regular timer.

    But every object spawned has a different instance variable containing the time in seconds to start that timer.

    So, I was trying to change the timer tag based on another instance variable, an ID. This way, the tag changes each time, and so does the On Timer tag.

    For example

    Loop spawning objects

    OBJECT Start Timer _ "Name"&Object.InstanceVariableName for Object.InstanceVariableTime seconds (Regular)

    OBJECT On timer "Name"&ObjectInstanceVariableName Actions

    It works for the first set of spawned objects, but every time I change the instance variables to start a new set of objects with different a timer setup, the previous set of timers stops.

    However, if I change the program and create different Timer Tags hardcoded, like:

    Inside the loop

    if "Name"&ObjectInstanceVariableName = Name1 then Start Timer "Name1"

    if "Name"&ObjectInstanceVariableName = Name2 then Start Timer "Name2"

    ...

    On Timer "Name 1" Actions

    The setup works perfectly, and the previous timers don't stop.

    My question is:

    Is there a way to start multiple timers with tags that are variable strings and not "hardcoded" names? How do I do that?

    (I have also tried to use a string global variable that was set before the Start Timer and was set to be the timer's tag and on timer trigger, but that didn't work as well, I thought it could be a "string problem" or something)

    Thanks.

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 6 posts