Makoren's Recent Forum Activity

  • Yep, cutting down the size of that sprite sheet fixed it. Thanks.

  • [SW] Up to date

    c3runtime.js:2 Made with Construct 3, the game and app creator :: construct.net

    c3runtime.js:2 [C3 runtime] Hosted in DOM, rendering with WebGL 2 [ANGLE (AMD Radeon (TM) R9 200 Series Direct3D11 vs_5_0 ps_5_0)]

    register-sw.js:1 Registered service worker on <site I don't want to disclose>

    There are no console errors or warnings. The browser I'm using supports WebGL.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Project file: ufile.io/4y5qr

    The game runs fine on both Windows and Mac, but it will not work on iOS or Android. On iOS/Android the game will load the background color, but nothing else. Tested on the latest version of Chrome with the latest version of Construct 3, on both Remote Preview and by exporting the game as HTML5 and hosting it.

    Does anyone know what the issue is here?

    EDIT: Should have mentioned that I can make a new project, and it will work on mobile just fine. This problem appears to be specific to this project.

  • I'm currently making a system where you walk in front of a treasure chest, and if you aren't moving or attacking, you will open it after a few seconds using a Timer behavior.

    I want to make this visible to the player through an "interaction bar" which appears under the player. It should change its width based on how long the timer has been running.

    I've tried using the Timer expressions, but for some reason these are always 0. Am I using them wrong, or is there a different approach?

    Here's my project file: ufile.io/b2vfg

    The logic I've added is in the eCharacters and eInteractions event sheets. I'm trying to change the width of the "castbar" sprite.

  • Here's my project file, health bar logic is in the "eCharacters" event sheet: ufile.io/dwc1s

    If you take damage in the Main layout, the health bar updates normally, changing size based on HP lost. But if you go to FirstTown or NextTown, the health bar doesn't update if you take damage.

    I can't think of any reason why this would happen, since all layouts share the same event sheet.

  • Fixed. All I did to fix this was add an "isPlayer" boolean flag to the Characters family that is false for all characters except the Player. Then I added another condition to check if the character is a player or not before using the appropriate action.

  • I'm adding variables to the player because of this event:

    The Player object is part of the Characters family.

    I agree that putting player data in two places is bad code. If I could change this event to get global variables if the Player is picked specifically, then that would be a better fix.

    I started this thread because I couldn't find a solution to that and tried a different approach, but if anyone knows how to pick the Player object in that event, I would love to know.

  • In GameMaker, there's an event called the "begin step" event. Any code in that event will be triggered at the start of the frame, before the regular step event and other triggers. Is there something similar in Construct 3?

    The reason I ask this is because I'm using global variables to store player data like HP, since the data needs to be persistent across layouts and the Persist behaviour doesn't seem to work for this. Then every tick, I'm giving this data to the player in the form of instance variables.

    The problem here is that if I try to update my health bar based on the player's variables, it will update the health bar after HP has been changed globally, but before it has been added to the player. A "begin step" condition would solve this immediately.

    Here's my project file if you need a closer look: ufile.io/1ol4z

    The health bar code is held in eCharacters, the global variables are held in eGlobals, and the data copying is also done in eGlobals.

    Any help is appreciated.

  • Thanks for the project. It's too late for me to fix my project tonight, but I'll study yours tomorrow.

  • I've been googling for the past 20 minutes to no avail. Here's my project file: ufile.io/21yo4

    The problem code is in the eHealthbar event sheet. The variable "prevHP" is only for the health bar system, feel free to remove it while messing around.

    Right now, each character in the Character family has a HP bar. They're pinned correctly, and they all get destroyed correctly when one character dies. I also have a working formula on how to reduce the size of the HP bar according to player HP.

    The problem I have is that every enemy takes damage at once. How do I make it so that the only HP bar that is reduced belongs to the enemy that was attacked?

  • You do not have permission to view this post

  • You do not have permission to view this post

Makoren's avatar

Makoren

Member since 5 Mar, 2018

None one is following Makoren yet!

Trophy Case

  • 6-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

9/44
How to earn trophies