calminthenight's Forum Posts

  • Good to hear.

    I've added a tutorial that covers this and also includes an option to scale the shadow as another effect. You can find it here: https://www.construct.net/en/tutorials/adaptive-platformer-shadows-2475

  • Here you go. Works like a charm.

    https://1drv.ms/u/s!AkmrWgxeuxlKg_5vjCLQNeSnDs7ugA?e=4r3URh

  • Ok I think that should be easy to fix, just checking first. Are the shadows are supposed to remain on the ground and fade opacity out when the enemy is jumping, and you don't want the upper row enemies to have shadows?

    If that's the case I wouldn't recommend using the "is overlapping" condition to achieve what you are doing

    -Use a container like you have

    -Make an event to position shadows: Every Tick, set shadow.X to enemy.X. Set shadow.Y to floor-height

    -Make an event to control removing shadows for higher enemies: If enemy.y => maximum-height set shadow.opacity to 0

    -Make an event to control shadow opacity for jumping enemies: If enemy.y < maximum-height set shadow.opacity to 100-distance(enemy.x,enemy.y,shadow.x,shadow.y)

    I'll do a quick example to show you what I mean

  • Hi Velokrysia

    There are a lot of ways you could achieve what you are trying to do very simply.

    Firstly, no you cannot have multiple collision polygons within a single sprite. To build your world I would recommend using the tile-map feature if you are familiar with tile-maps.

    However, if you do want to just use a single sprite then you can just use other invisible sprites as triggers for things like transitioning to the inside of a house. Keep in mind that there is a maximum sprite size of i think 2048x2048 which could limit you if you do it this way.

    Regardless of the way you do it an easy way to create a trigger is to make a sprite, and set the size and collision polygon to whatever you need. Add it to your scene and place it where you need it. In the left hand window of the editor, set the opacity to 0% and make sure the "enable collissions" option is selected.

    In the events editor, you can use the "On Collision with" event to trigger the change by saying: Player sprite 'on collision with' doortrigger - Then insert the action you want to happen.

    If you do go down the Tile-Map option there are other ways you can call the door collision, by checking if the player is overlapping a certain tile etc.

    Hope that helps

  • Hi MrClifford

    Instead of creating the shadows using events, just make a container and include both the shadow and the enemy sprite. When the enemy is spawned the shadow will spawn to.

    You can use: Every Tick - Set shadow XY to enemy XY to keep it located (also angle if necessary), and assuming you have matched animations for the shadow and enemy, use: Every tick, set shadow animation.frame to enemy animation.frame.

    Then when the enemy is destroyed it will automatically be destroyed too.

  • If you added set speed to zero while teleporting on the teleport example I gave you it would solve that issue. The ball would only appear at the designated spot. Then the controls would be reengaged and the speed and direction would return. With bounce off solids enabled the ball would then not enter the wall.

    Good luck

  • Hi dazedangels

    Firstly just checking that you had the bullet "bounce off solids" behaviour enabled when you had the walls and ball set as solids?

    I've attached a small .c3p for the teleport behaviour let me know if it helps. If you explain your situation a bit more I might be able to help.

    https://1drv.ms/u/s!AkmrWgxeuxlKg_5uCwV0lB07dG29HA?e=SN5O33

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi All,

    I'm currently using five events to set pathfinding paths for enemies based on the player position and some constraints. I'm trying to simplify it down to a single event and am very close but can't get the minimum distance to work properly.

    What I'm trying to achieve:

    - Every X secs, find path to a 360° area within 420px and no closer than 100px to player position.

    Using the 5 event method I can achieve it with:

    Using the one event method it works but the minimum distance is not being observed (the maximum is).

    I'm sure it is possible and my math is just wrong?

    Tagged:

  • Hi All,

    I've been trying to set up a system where I can stop and play a single sound effect from multiple instances of an object in game at different times. I have tried a bunch of different ways but can never get it to work successfully. I think my problem lies in not being able to pick a specific object instance and reference the audio tag that is playing.

    In my most recent attempt, I have an instance variable that measures distance to player.

    If object.variable is less than 500:

    Trigger once: Play sound w tag "object"&object.UID

    If object.variable is more than 500: Stop sound w tag "object"&object.UID

    Even when using only two objects, the stop condition will not function correctly.

    I've tried other methods, picking instances etc. but no luck.

    Is this possible at the moment? I'm using the positional audio 'play at object'. Which tracks the object. Is it possible to pick the audio object that is tracking an object instance some way?

    Tagged:

  • Hi All,

    I have a successful game build using the latest NWJS version however, when trying to get it running on V0.33.3 for Greenworks compatibility, I'm having rendering issues. The game launches and functions, but only the background and mouse sprite are rendered. I've navigated through many pages of greenworks and NWJS documentation but can't find a resolution for even a similar issue.

    chrome://gpu page within NWJS is reporting this error [10800:5116:0607/144854.538:ERROR:gl_utils.cc(307)] : [.WebGL-000001A7B2C34A70] GL_INVALID_VALUE: Destination texture not large enough to copy to.

    Has anyone had a similar experience and possibly found a resolution?

    Tagged:

  • Follow up. It's an issue with multiple screens. When the NWJS executable is launched inside 'Display 2' at 200% DPI scaling, for some reason it is reading the DPI value of 'Display 1'. This only happens at 200% scaling.

  • When I use the PlatformInfo.DevicePixelRatio to return the DPR value of a screen it works flawlessly in preview and in a NW.JS export. If the screen is set to scale to 125% it returns 1.25, 150% 1.5 etc. This works all the way up to 200%, where for some reason it displays correctly when previewing the project (2) however, using a NW.JS export it returns a value of 1.25.

    Any ideas, possible bug?

  • dop2000

    Uuuurrgh. How have I not found this before haha. Thanks

  • This might be a stupid question. But I can't find an option to query the resolution of a display, not just the browser window.

    Is it possible?

  • Ashley

    Thanks for the info and demo project!

    I'm not relying on anything to do with this in a project, I just wanted to get a better understanding of how the engine handled multiple sheets.

    Thanks for filling me in