phlp's Forum Posts

  • You do not have permission to view this post

  • What if you make the objects global and add an instance boolean? Then on start/end of layout, check the boolean and, if false, destroy the instance?

  • You do not have permission to view this post

  • You do not have permission to view this post

  • Why not create two similar objects, one global the other not, put them in a family, and do all event logic on the family and use the object you need?

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • Why are you, in one place, setting the vector components of 8direction, and, in another, setting the maximum speed of 8direction? How are you calculating your own variables "VectorX" and "VectorY"?

  • Use the Local Storage plugin.

  • That is exactly the behavior I expected and did not get. After running the project in Preview once, trying to change the import and event sheet gives an error:

    Or, going the other direction:

    Changing to import * as Main first, running in Preview once, and then using Undo to go back to import {GetMessage} and running in Preview again works fine. I can Undo/Redo back and forth and it will run, but changing it back by typing it out breaks it again.

    I guess this is a bug then. I'll submit a bug report when I get a chance.

  • Using this example from the TypeScript tutorial, GetMessage can be imported from main.ts with either

    	import { GetMessage } from "./main.js";
    

    or

    import * as Main from "./main.js";

    However, once this is done one way, switching to the other, or changing the name for the module, seems to be impossible.

    Is there a way to force importsForEvents to update? This does not seem to be a problem in JavaScript, only TypeScript, and the only workaround I've found is by converting to JS then back to TS.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • At a glance, it looks like you're checking an instance variable uniqueId of player_hitbox, but setting a different instance variable playerUID.

    If that isn't the problem, I would suggest outputting all of the variables you're comparing to see why they may not be lining up.

  • You can make a shooting mechanic that will shoot lines.

    1) Add Bullet Physics behaviour to the line

    ...

    This is a good and clever solution.

  • Why not use the Tile movement behavior?

    Alternately, you can use Is overlapping at offset.