NotTimTam's Forum Posts

  • 3D physics are custom. Constructs platform behavior does not support 3D. :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is more of a Math question but since it uses construct features I figured I would ask it here instead of Stack Overflow...

    I've built a variation on the 3d platformer example project.

    It uses a similar dz adjustment system for the player's z-height, allowing them to jump/fall.

    From line 38 onwards in the Player event sheet, I set a maximum height for steps, and then, when a player collides with a step, they move up onto it. The problem is, the movement is very rigid and sudden, and not natural at all. For other reasons I cannot interpolate the Z-axis as it is used for bobbing/etc.

    How can I modify the player's DZ on line 44, to counter-act gravity and move up exactly four pixels before beginning to fall again?

    + Player: On collision with Platforms + Player: DZ = 0 + System: Platforms.ZElevation + Platforms.ZHeight ≤ Player.ZElevation + StepHeight + System: Platforms.ZElevation + Platforms.ZHeight > Player.ZElevation -> System: Set PlayerOldZ to Player.ZElevation -> Player: Set Z elevation to Platforms.ZElevation + Platforms.ZHeight -> Player: Set OnGround to True

    Thanks!

    Full capx: https://drive.google.com/file/d/1ri4KdhNpJotnZ0uNoLAzYYXpD0r10mJt/view?usp=sharing

  • It looks like the Scroll-To Behavior scripting interface does not contain a method for running the Screen Shake action.

    	runtime.objects.Player.getFirstInstance().behaviors.ScrollTo
    

    How else can I do this without creating my own tooling?

    Thanks

  • I have a player object with a collision polygon down at his feet that is about two-three pixels tall, that way, for perspective, he can walk up close to walls, and be, seemingly, in front of them. The problem is, if I, for instance, hold the up button while up against a wall, the character bounces a pixel away from it and then back over and over. I have ensured that the walls have flat-edged polygons, the player has flat-edged polygons, and that the player's image point doesn't change relative to the player's collision polygon during animations.

    EXAMPLE OF ISSUE:

    Subscribe to Construct videos now

    EXAMPLE OF POLYGON:

  • I am confident that the sprite is actually overlapping the tilemap, I don't think this is the issue...

  • I am creating a procedurally generated world map using tilemaps. Essentially, each tile in a tilemap is 16x16 pixels, and the game creates a "chunk" or a tilemap object with a size of 256x256 pixels, or 16 horizontal tiles and 16 vertical ones. Essentially the game will create a new "chunk" object within a certain distance of the player. My issue is, I use these simple sprites that are created every time a new chunk is created, to check if there is space to make another chunk, but, if one of these sprites overlaps an already existing chunk, I want it to be destroyed, so that it doesn't make a new chunk on top of the old one. The problem is if I use the "is overlapping (chunk)" block, nothing happens, no overlap is detected, and the sprite object isn't deleted, instead, a game-breaking amount of tilemaps are created on top of each other. Here's my file...

    dropbox.com/s/n7vo6xmaf2n25ws/File.c3p

  • AllanR that does work, but it seems a little jittery, Terraria has smoother movement. But I'll mess with this and see if I get a result I like. Thanks a ton...

  • I have a 'terraria' like pixel art game. In terraria, as you are walking forward, if there is a "wall" in front of you at the height of one block (8 pixels) you can step over it without jumping, at any greater height, you'd have to jump. In engines like unity, you can create player step heights, so depending on the height of an object, the player can step smoothly on top of it without having to jump. How can I do this in Construct using 8x8 cubes and a platformer player character with a size of 8x16 without editing collision polygons? Thanks

  • Changing where the tick event was worked. That was weird... Thanks a ton

  • I've been working on a day/night cycle for this game, and I have everything working so far. The Sun/Moon orbits properly, and the background changes colors smoothly based on the time of day. The only issue is, whenever I switch from night to day, because of the equations I use, there is a bright white flash on the screen for some reason I can't find. Can someone help me make this smoother?

    CurrentTime = The current time of day, which is increased every 0.01 seconds via the CurrentTimeScale variable, which at default should be 0.01, but for the sake of testing is sped up to 5.

    CurrentTimeScale = (Read above)

    CurrentTimeAmount = A decimal based on the percentage of the day completed. One day is 720 (timescalespeedhere) so if the day is at 360 out of 720, then CurrentTimeAmount would read as 0.5...

    IsDay is a simple variable to check if it is day or night. Instead of currenttime being 24 "hours" it is split in 'half' at 720 'minutes.'

    LastSkyR/G/B are the colorvalues that the background sets its color to.

  • Thanks a ton but I had just discovered this thing existed right after posting this! I never knew it was a thing lol...

  • I'm making a game that has a secret Text editor in it. I was trying to use the built-in GetFile addon to grab a text document, take the text from it, and set a variable to that text. But I can't figure out how to get the data. So I tried doing it with Javascript. First, I created this script:

    Then, within my event sheet, I check if a button is pressed, and run this script when it is:

    	globalThis.TextField.Input = openFile()
    

    When I run the game, and click the button, it opens a windows file dialogue and allows me to select a plain-text file. I select one, but when I do, the whole window goes white and displays the text, like it replaced the browser tab with the actually opened file, instead of importing the file into the game. Not sure what I am doing wrong here?!

    Also, I would like to save text files to the device using the file dialogue as well.

  • Just do this:

    When (CROUCH) key is down:

    Player (Set animation to "CROUCHING ANIMATION")

    Player (Set max platform speed to 0)

  • That worked thanks a ton

  • dop2000 how do I save a json file in local storage, local storage is like a dictionary I thought.