m4nbarep1g's Recent Forum Activity

  • No problem, here's a quick example.

    drive.google.com/file/d/1aA8BgPh9VGMuIjVko1eVC5zye1leriks/view

    The 'enemy' sprite will pace left to right and if it overlaps with the 'player' sprite, while the player sprite's 'hidden' variable is at 0 it will destroy the sprite (you can replace that action with any animation you may want to add)

    The player sprite can be moved left or right with A & D on the keyboard, and when the player sprite is overlapping the 'bed' sprite and W is pressed, the 'player' sprite will set it's position to the 'bed' sprite and go to the bottom of the layer, physically hiding it from site. It also changed the 'hidden' variable to 1, so if the enemy sprite now overlaps it, it won't trigger the destroy action.

    Pressing W again, triggers another action that reverses the hiding. Again you can replace these action with whatever animation you have in mind, it is just the action of changing the 'hidden' variable to 1 that matters.

  • Hi Doflanico,

    I'm still fairly new to Construct myself, but I think the easiest way to do this would be to use an instance variable on your player sprite, call the variable something like 'Hidden' and default to 0.

    Add an action to set the variable to 1 when they hide, and set the event where your enemy sprite kills the player to check this variable, and if hidden=1 it doesn't trigger

  • Hi,

    I'm still fairly new to Construct. I'm working on a 2 player battle card game, which I'm starting to test out now, but on the last test with a friend of mine I noticed an issue.

    If the host minimizes the window, it obviously suspends the game, but this causes an issue on the peer side. The positioning, and various visual aspects, including the visibility, of card sprites on the screen is controlled by various instance variables, which trigger certain events as cards are played to get them to become visible and display in the correct position.

    Once the host's game is suspended for around 10 seconds, the peers game seems to refresh, and all of the sprites disappear for a moment, then they reappear/rearrange themselves on the screen, but most of them are invisible as the event to make them visible doesn't trigger again.

    I've read on various other posts that I might want to look at' on suspended'/'on resume' events to combat this, but I haven't seen anything referring to this exact situation, so I'm unsure how to implement it in this scenario.

    I could write events that would re-trigger the visibility of the correct sprites when this happens, but, firstly, I suspect these would have to be every tick events, which is obviously not ideal, as it may override other events, and secondly, even if I can get them to retrigger properly, there will still be a blip where everything disappears for a moment on the peer's side.

    Here's the project file

    https://www.dropbox.com/s/yfis0na3hgj9lh4/Pixel%20Ships-Changing%20to%20nwjs%20save.c3p?dl=0

  • Hi, I've got a multiplayer project I've been working on for a while, but recently I've been having intermittent issues with remote previewing it. When I first load the remote preview in two windows, it mostly loads fine, but after a few reloads, one of the windows bugs out and seems to take down the WebGL renderer with it.

    I've got the below from the console on the window that crashed.

    This never used to happen, but I have made quite a few changes to the project recently, so not sure if it's an issue with my code or something else as I'm also still quite new to Construct. The other thing is that I was previously working on this project on a laptop, but I am now on a desktop with a GTX 1660ti GPU, running dual screens. Although, I'm pretty certain it was running fine on this desktop until recently.

    WebGL: CONTEXT_LOST_WEBGL: loseContext: context lost

    canvasManager.js:25 [Construct 3] WebGL context lost

    runtime.js:61 [Construct 3] Suspending

    /#c9vp73rh:1 WebGL: CONTEXT_LOST_WEBGL: loseContext: context lost

    11imageAsset.js:3 Failed to load texture: Error: context lost

    at WebGLRenderer.CreateStaticTexture (webglRenderer.js:67)

    at Object.func (webglRenderer.js:68)

    at DoNextAsyncifiedJob (asyncify.js:3)

    at DoAsyncifiedWork (asyncify.js:2)

    (anonymous) imageAsset.js:3

    Promise.catch (async)

    LoadStaticTexture imageAsset.js:3

    LoadStaticTexture imageInfo.js:5

    (anonymous) animationInfo.js:2

    LoadAllTextures animationInfo.js:2

    (anonymous) type.js:1

    LoadTextures type.js:1

    LoadTextures objectClass.js:13

    MaybeLoadTexturesFor layout.js:10

    CreateInstanceFromData runtime.js:44

    CreateInstance runtime.js:42

    CreateObject actions.js:2

    _RunSystem action.js:14

    _RunActions_Fast eventBlock.js:25

    Retrigger eventBlock.js:32

    _Repeat plugin.js:6

    Repeat conditions.js:15

    RunSingleCnd_1param condition.js:7

    _RunAndBlock eventBlock.js:23

    Run eventBlock.js:20

    _RunSubEvents_SolWriterAfterCnds eventBlock.js:29

    _RunSubEvents eventBlock.js:28

    _RunAndBlock eventBlock.js:23

    Run eventBlock.js:20

    _RunSubEvents_SolWriterAfterCnds eventBlock.js:29

    _RunSubEvents eventBlock.js:28

    _RunAndBlock eventBlock.js:23

    Run eventBlock.js:20

    _ExecuteTrigger eventSheet.js:18

    _TriggerForClass eventSheet.js:12

    _Trigger eventSheet.js:11

    _Trigger eventSheetManager.js:13

    Trigger runtime.js:79

    TriggerAsync runtime.js:80

    TriggerAsync sdkInstanceBase.js:3

    _TriggerComplete instance.js:2

    async function (async)

    _TriggerComplete instance.js:2

    request.onreadystatechange instance.js:6

    XMLHttpRequest.send (async)

    (anonymous) instance.js:8

    _DoRequest instance.js:5

    RequestFile actions.js:2

    _RunActions_ReturnValue eventBlock.js:26

    _RunAndBlock eventBlock.js:23

    Run eventBlock.js:20

    _ExecuteTrigger eventSheet.js:18

    _TriggerForClass eventSheet.js:12

    _Trigger eventSheet.js:11

    _Trigger eventSheetManager.js:13

    Trigger runtime.js:79

    TriggerAsync runtime.js:80

    _StartRunning layout.js:15

    async function (async)

    _StartRunning layout.js:14

    _DoChangeLayout runtime.js:76

    async function (async)

    _DoChangeLayout runtime.js:75

    _MaybeChangeLayout runtime.js:73

    Tick runtime.js:66

    async function (async)

    Tick runtime.js:66

    normal runtime.js:6

    (anonymous) miscutil.js:18

    async function (async)

    (anonymous) miscutil.js:18

    requestAnimationFrame (async)

    RequestPostAnimationFrame miscutil.js:18

    _RequestAnimationFrame runtime.js:59

    Tick runtime.js:66

    async function (async)

    Tick runtime.js:66

    normal runtime.js:6

    (anonymous) miscutil.js:18

    async function (async)

    (anonymous) miscutil.js:18

    requestAnimationFrame (async)

    RequestPostAnimationFrame miscutil.js:18

    _RequestAnimationFrame runtime.js:59

    Tick runtime.js:66

    async function (async)

    Tick runtime.js:66

    normal runtime.js:6

    (anonymous) miscutil.js:18

    async function (async)

    (anonymous) miscutil.js:18

    requestAnimationFrame (async)

    RequestPostAnimationFrame miscutil.js:18

    _RequestAnimationFrame runtime.js:59

    Tick runtime.js:66

    async function (async)

    Tick runtime.js:66

    normal runtime.js:6

    (anonymous) miscutil.js:18

    async function (async)

    (anonymous) miscutil.js:18

    requestAnimationFrame (async)

    RequestPostAnimationFrame miscutil.js:18

    _RequestAnimationFrame runtime.js:59

    Tick runtime.js:66

    async function (async)

    Tick runtime.js:66

    normal runtime.js:6

    (anonymous) miscutil.js:18

    async function (async)

    (anonymous) miscutil.js:18

    requestAnimationFrame (async)

    RequestPostAnimationFrame miscutil.js:18

    _RequestAnimationFrame runtime.js:59

    Tick runtime.js:66

    async function (async)

    Tick runtime.js:66

    normal runtime.js:6

    (anonymous) miscutil.js:18

    async function (async)

    (anonymous) miscutil.js:18

    requestAnimationFrame (async)

    RequestPostAnimationFrame miscutil.js:18

    _RequestAnimationFrame runtime.js:59

    Tick runtime.js:66

    async function (async)

    Tick runtime.js:66

    normal runtime.js:6

    (anonymous) miscutil.js:18

    async function (async)

    (anonymous) miscutil.js:18

    requestAnimationFrame (async)

    RequestPostAnimationFrame miscutil.js:18

    _RequestAnimationFrame runtime.js:59

    Tick runtime.js:66

    async function (async)

    Tick runtime.js:66

    normal runtime.js:6

    (anonymous) miscutil.js:18

    async function (async)

    (anonymous) miscutil.js:18

    requestAnimationFrame (async)

    RequestPostAnimationFrame miscutil.js:18

    _RequestAnimationFrame runtime.js:59

    Tick runtime.js:66

    async function (async)

    Tick runtime.js:66

    normal runtime.js:6

    (anonymous) miscutil.js:18

    async function (async)

    (anonymous) miscutil.js:18

    requestAnimationFrame (async)

    RequestPostAnimationFrame miscutil.js:18

    _RequestAnimationFrame runtime.js:59

    Tick runtime.js:66

    Show 6 more frames

    36imageAsset.js:3 Failed to load texture: context lost

    (anonymous) imageAsset.js:3

    Promise.catch (async)

    LoadStaticTexture imageAsset.js:3

    LoadStaticTexture imageInfo.js:5

    (anonymous) animationInfo.js:2

    LoadAllTextures animationInfo.js:2

    (anonymous) type.js:1

    LoadTextures type.js:1

    LoadTextures objectClass.js:13

    MaybeLoadTexturesFor layout.js:10

    CreateInstanceFromData runtime.js:44

    CreateInstance runtime.js:42

    CreateObject actions.js:2

    _RunSystem action.js:14

    _RunActions_Fast eventBlock.js:25

    Retrigger eventBlock.js:32

    _Repeat plugin.js:6

    Repeat conditions.js:15

    RunSingleCnd_1param condition.js:7

    _RunAndBlock eventBlock.js:23

    Run eventBlock.js:20

    _RunSubEvents_SolWriterAfterCnds eventBlock.js:29

    _RunSubEvents eventBlock.js:28

    _RunAndBlock eventBlock.js:23

    Run eventBlock.js:20

    _RunSubEvents_SolWriterAfterCnds eventBlock.js:29

    _RunSubEvents eventBlock.js:28

    _RunAndBlock eventBlock.js:23

    Run eventBlock.js:20

    _ExecuteTrigger eventSheet.js:18

    _TriggerForClass eventSheet.js:12

    _Trigger eventSheet.js:11

    _Trigger eventSheetManager.js:13

    Trigger runtime.js:79

    TriggerAsync runtime.js:80

    TriggerAsync sdkInstanceBase.js:3

    _TriggerComplete instance.js:2

    async function (async)

    _TriggerComplete instance.js:2

    request.onreadystatechange instance.js:6

    XMLHttpRequest.send (async)

    (anonymous) instance.js:8

    _DoRequest instance.js:5

    RequestFile actions.js:2

    _RunActions_ReturnValue eventBlock.js:26

    _RunAndBlock eventBlock.js:23

    Run eventBlock.js:20

    _ExecuteTrigger eventSheet.js:18

    _TriggerForClass eventSheet.js:12

    _Trigger eventSheet.js:11

    _Trigger eventSheetManager.js:13

    Trigger runtime.js:79

    TriggerAsync runtime.js:80

    _StartRunning layout.js:15

    async function (async)

    _StartRunning layout.js:14

    _DoChangeLayout runtime.js:76

    async function (async)

    _DoChangeLayout runtime.js:75

    _MaybeChangeLayout runtime.js:73

    Tick runtime.js:66

    async function (async)

    Tick runtime.js:66

    normal runtime.js:6

    (anonymous) miscutil.js:18

    async function (async)

    (anonymous) miscutil.js:18

    requestAnimationFrame (async)

    RequestPostAnimationFrame miscutil.js:18

    _RequestAnimationFrame runtime.js:59

    Tick runtime.js:66

    async function (async)

    Tick runtime.js:66

    normal runtime.js:6

    (anonymous) miscutil.js:18

    async function (async)

    (anonymous) miscutil.js:18

    requestAnimationFrame (async)

    RequestPostAnimationFrame miscutil.js:18

    _RequestAnimationFrame runtime.js:59

    Tick runtime.js:66

    async function (async)

    Tick runtime.js:66

    normal runtime.js:6

    (anonymous) miscutil.js:18

    async function (async)

    (anonymous) miscutil.js:18

    requestAnimationFrame (async)

    RequestPostAnimationFrame miscutil.js:18

    _RequestAnimationFrame runtime.js:59

    Tick runtime.js:66

    async function (async)

    Tick runtime.js:66

    normal runtime.js:6

    (anonymous) miscutil.js:18

    async function (async)

    (anonymous) miscutil.js:18

    requestAnimationFrame (async)

    RequestPostAnimationFrame miscutil.js:18

    _RequestAnimationFrame runtime.js:59

    Tick runtime.js:66

    async function (async)

    Tick runtime.js:66

    normal runtime.js:6

    (anonymous) miscutil.js:18

    async function (async)

    (anonymous) miscutil.js:18

    requestAnimationFrame (async)

    RequestPostAnimationFrame miscutil.js:18

    _RequestAnimationFrame runtime.js:59

    Tick runtime.js:66

    async function (async)

    Tick runtime.js:66

    normal runtime.js:6

    (anonymous) miscutil.js:18

    async function (async)

    (anonymous) miscutil.js:18

    requestAnimationFrame (async)

    RequestPostAnimationFrame miscutil.js:18

    _RequestAnimationFrame runtime.js:59

    Tick runtime.js:66

    async function (async)

    Tick runtime.js:66

    normal runtime.js:6

    (anonymous) miscutil.js:18

    async function (async)

    (anonymous) miscutil.js:18

    requestAnimationFrame (async)

    RequestPostAnimationFrame miscutil.js:18

    _RequestAnimationFrame runtime.js:59

    Tick runtime.js:66

    async function (async)

    Tick runtime.js:66

    normal runtime.js:6

    (anonymous) miscutil.js:18

    async function (async)

    (anonymous) miscutil.js:18

    requestAnimationFrame (async)

    RequestPostAnimationFrame miscutil.js:18

    _RequestAnimationFrame runtime.js:59

    Tick runtime.js:66

    async function (async)

    Tick runtime.js:66

    normal runtime.js:6

    (anonymous) miscutil.js:18

    async function (async)

    (anonymous) miscutil.js:18

    requestAnimationFrame (async)

    RequestPostAnimationFrame miscutil.js:18

    _RequestAnimationFrame runtime.js:59

    Tick runtime.js:66

    Show 6 more frames

    layout.js:10 Uncaught (in promise) Error: context lost

    at WebGLRenderer.CreateStaticTexture (webglRenderer.js:67)

    at Object.func (webglRenderer.js:68)

    at DoNextAsyncifiedJob (asyncify.js:3)

    at DoAsyncifiedWork (asyncify.js:2)

    CreateStaticTexture webglRenderer.js:67

    (anonymous) webglRenderer.js:68

    DoNextAsyncifiedJob asyncify.js:3

    DoAsyncifiedWork asyncify.js:2

    async function (async)

    MaybeLoadTexturesFor layout.js:10

    CreateInstanceFromData runtime.js:44

    CreateInstance runtime.js:42

    CreateObject actions.js:2

    _RunSystem action.js:14

    _RunActions_Fast eventBlock.js:25

    Retrigger eventBlock.js:32

    _Repeat plugin.js:6

    Repeat conditions.js:15

    RunSingleCnd_1param condition.js:7

    _RunAndBlock eventBlock.js:23

    Run eventBlock.js:20

    _RunSubEvents_SolWriterAfterCnds eventBlock.js:29

    _RunSubEvents eventBlock.js:28

    _RunAndBlock eventBlock.js:23

    Run eventBlock.js:20

    _RunSubEvents_SolWriterAfterCnds eventBlock.js:29

    _RunSubEvents eventBlock.js:28

    _RunAndBlock eventBlock.js:23

    Run eventBlock.js:20

    _ExecuteTrigger eventSheet.js:18

    _TriggerForClass eventSheet.js:12

    _Trigger eventSheet.js:11

    _Trigger eventSheetManager.js:13

    Trigger runtime.js:79

    TriggerAsync runtime.js:80

    TriggerAsync sdkInstanceBase.js:3

    _TriggerComplete instance.js:2

    async function (async)

    _TriggerComplete instance.js:2

    request.onreadystatechange instance.js:6

    XMLHttpRequest.send (async)

    (anonymous) instance.js:8

    _DoRequest instance.js:5

    RequestFile actions.js:2

    _RunActions_ReturnValue eventBlock.js:26

    _RunAndBlock eventBlock.js:23

    Run eventBlock.js:20

    _ExecuteTrigger eventSheet.js:18

    _TriggerForClass eventSheet.js:12

    _Trigger eventSheet.js:11

    _Trigger eventSheetManager.js:13

    Trigger runtime.js:79

    TriggerAsync runtime.js:80

    _StartRunning layout.js:15

    async function (async)

    _StartRunning layout.js:14

    _DoChangeLayout runtime.js:76

    async function (async)

    _DoChangeLayout runtime.js:75

    _MaybeChangeLayout runtime.js:73

    Tick runtime.js:66

    async function (async)

    Tick runtime.js:66

    normal runtime.js:6

    (anonymous) miscutil.js:18

    async function (async)

    (anonymous) miscutil.js:18

    requestAnimationFrame (async)

    RequestPostAnimationFrame miscutil.js:18

    _RequestAnimationFrame runtime.js:59

    Tick runtime.js:66

    async function (async)

    Tick runtime.js:66

    normal runtime.js:6

    (anonymous) miscutil.js:18

    async function (async)

    (anonymous) miscutil.js:18

    requestAnimationFrame (async)

    RequestPostAnimationFrame miscutil.js:18

    _RequestAnimationFrame runtime.js:59

    Tick runtime.js:66

    async function (async)

    Tick runtime.js:66

    normal runtime.js:6

    (anonymous) miscutil.js:18

    async function (async)

    (anonymous) miscutil.js:18

    requestAnimationFrame (async)

    RequestPostAnimationFrame miscutil.js:18

    _RequestAnimationFrame runtime.js:59

    Tick runtime.js:66

    async function (async)

    Tick runtime.js:66

    normal runtime.js:6

    (anonymous) miscutil.js:18

    async function (async)

    (anonymous) miscutil.js:18

    requestAnimationFrame (async)

    RequestPostAnimationFrame miscutil.js:18

    _RequestAnimationFrame runtime.js:59

    Tick runtime.js:66

    async function (async)

    Tick runtime.js:66

    normal runtime.js:6

    (anonymous) miscutil.js:18

    async function (async)

    (anonymous) miscutil.js:18

    requestAnimationFrame (async)

    RequestPostAnimationFrame miscutil.js:18

    _RequestAnimationFrame runtime.js:59

    Tick runtime.js:66

    async function (async)

    Tick runtime.js:66

    normal runtime.js:6

    (anonymous) miscutil.js:18

    async function (async)

    (anonymous) miscutil.js:18

    requestAnimationFrame (async)

    RequestPostAnimationFrame miscutil.js:18

    _RequestAnimationFrame runtime.js:59

    Tick runtime.js:66

    async function (async)

    Tick runtime.js:66

    normal runtime.js:6

    (anonymous) miscutil.js:18

    async function (async)

    (anonymous) miscutil.js:18

    requestAnimationFrame (async)

    RequestPostAnimationFrame miscutil.js:18

    _RequestAnimationFrame runtime.js:59

    Tick runtime.js:66

    async function (async)

    Tick runtime.js:66

    normal runtime.js:6

    (anonymous) miscutil.js:18

    async function (async)

    (anonymous) miscutil.js:18

    requestAnimationFrame (async)

    RequestPostAnimationFrame miscutil.js:18

    _RequestAnimationFrame runtime.js:59

    Tick runtime.js:66

    async function (async)

    Tick runtime.js:66

    normal runtime.js:6

    (anonymous) miscutil.js:18

    async function (async)

    (anonymous) miscutil.js:18

    requestAnimationFrame (async)

    RequestPostAnimationFrame miscutil.js:18

    _RequestAnimationFrame runtime.js:59

    Tick runtime.js:66

    imageAsset.js:3 Failed to load texture: Error: context lost

    at WebGLRenderer.CreateStaticTexture (webglRenderer.js:67)

    at Object.func (webglRenderer.js:68)

    at DoNextAsyncifiedJob (asyncify.js:3)

    at DoAsyncifiedWork (asyncify.js:2)

  • You do not have permission to view this post

  • Also experiencing this issue... glad to see it's not just me.

    To add to it, I've just been able to save to Dropbox with no issue, but I seem to be unable to save a local file at all. Whenever I choose to save local I get an error

    "Unable to save project. Try checking you have permission to save in the chosen location. Alternatively try saving a different way."

    I thought I was about to lose a bunch of work until I thought to try Dropbox

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ah man, thank you so much! I've been puzzling over that for a while assuming it would be something in an expression, didn't think about checking the right click options. I knew there had to be a way to do it!

  • Thanks , but I want to select all the sprites where the variable equals 0 or 3, not just one or the other.

  • Hi,

    Is it possible to use some form of or operator when picking sprites by an instance variable?

    I'm building a card game, and on the deckbuilder screen I want to display the cards that are available to be selected in a grid formation on the screen. I have a function that does this using a for each loop, and an equation using the loopindex to space them out properly, but for this to work properly, I need to have narrowed them down the cards available to the player based on previous selection (stored as a global variable).

    Basically I want to create an expression that says where instance variable = 0 or instance variable = 3 then pick all of those sprites.

    If anyone can tell me if this is possible, and the best way of doing it would be great, thanks!

  • Thanks! Some good ideas I hadn't thought of there, I'll give them a go

  • Thanks , I did try something like this, moving onto their own layer I think, but I then had an issue around the cards still in the hand, as it meant all the stats were on top there too.

    I guess I could maybe write a condition that said to move to top of layer once the card it's pinned to is active, but it just seems strange that it works fine like this, until I trigger the event when hovering over the cards. Ideally I do want the stat to be moving up and down with the card, as it just makes it look more like it's one thing. But if it just doesn't work, then I'm happy with the solution I have now.

  • OK, here's another version where it'll load straight to a point of being able to see the bug. If you load it in debug (I've removed all the multiplayer stuff for now) all you have to do is drag drop one of the cards at the bottom of the screen to the middle, so it becomes active, it should then start "hovering" with the sine movement, then if you move the cursor over the other cards at the bottom of the screen, you'll see the text on the active card start to appear and disappear.

    https://drive.google.com/open?id=1XIoHqkz7h_zxRqTpuZkdw0hoylBoCX8d

m4nbarep1g's avatar

m4nbarep1g

Member since 3 Jun, 2020

None one is following m4nbarep1g yet!

Trophy Case

  • 4-Year Club
  • Email Verified

Progress

5/44
How to earn trophies