Chroma72's Forum Posts

  • There has to be a magic trick or declaration you can put somewhere.

    I'd like to do a globalThis.blah = () => {}; but I am forced to do (globalThis as any).blah = () => {};.

    I do have a main.ts file and I have a:

    declare global {

    }

    at the top. Any ideas? var globalthis: any; ??

  • Hi Ashley. I did some more testing and what I believe is that changing something in a .ts file and previewing/saving does trigger a tsc event. But...if you have a TS block in the event sheet and make a change there, it doesn't trigger a tsc event reliably. In order for a change in a TS block in an event sheet to recompile, I had to reload the project entirely.

    Also, try this:

    Import a function such as import { myFunc } from blah. Then use it in the event sheet in a TS block. Good it works. Now change the function name to myFunc1, and import myFunc1, and change it on the event sheet to myFunc1, and the event sheet will throw an error and say did you mean myFunc? Because the tsc didn't fire off for the script block in the event sheet I'm guessing.

    Maybe there's a tsc setting somewhere that automatically forces a compile when any TS file/script bloc in the event sheet is changed on each preview or save that I'm missing?

    For now, when I get an error caused by the tsc not firing when a TS block is changed in an event sheet (I really think that's what going on here), I'm just reloading the entire project so I can keep going.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok so I guess this is a known problem. When you make a small change in a .ts file and save, it doesn't run the tsc most of the time? Man, this is heart-breaking. I'm knee deep in TS and making multiple changes constantly, but I can't force a TS re-compile. I mean...damn...

  • ...be used in the event sheets? I've looked at the tutorials and even downloaded the sample. In the sample it looks easy (it uses .js) but is it a .ts thing?

    I set the .ts script to be the Import for events, then I do a 'import * as Blah from './myTSfile.js'. And none of the Blah.functions are available in the event sheets. I've check the syntax and the 'export function blahBlah() : string...it's all TS and it's right. But nothing is available. Wasting way too much time on this. Any ideas?

  • It would be really cool if you could adjust the collision polygon on a 9 patch with a physics behavior attached. That would be a game-changer for creating levels where you don't use the tilemap.

  • How are you people doing with ROI for a web game? I was gonna make my game a web based game but after doing some research decided to go with a steam based solution. Any inputs? Am I missing something?

  • Understood, but I'm not the only one. Hopefully other people with a similar problem will see this post and put in the fix.

  • Bug is fixed. I'm manually tracking the Card count on create and destroy. But, something is definitely wrong with the .Count method on Sprites now.

  • Ok so I actually realize that I over-reacted and I apologize Ashley.

    Something is up with Sprite.Count. I spawn a few "sprites" let's call them Card. Then I do a system call if Card.Count = 0 then goto next puzzle. That is failing now and after one match in a puzzle, it just goes to the next puzzle.

  • Getting a deprecated feature warning:

    Project property Export file structure is Flat

    ANY help would be appreciated.

  • I will look into it but I was linking a remote preview to a possible partner and it kept crashing. I realize this isn't much but I'm trying to work through this!

  • Now I know Ashley is going to say no...no we didn't...but you did. There are quite a few game out there that recently got broken and it's probably timing or maps. But man...I have to start over in Unity. Not happy and I'm done here.

  • I've been using C3 for several years, but have only been using the event sheets 'add event' etc, just the basic stuff. I recently have been working on a faster paced 2d shooter multiplayer game and was trying to pick an 'engine' (you know, the usual, unity/unreal engine/C3/others. I wasn't sure if I could do it in C3...until I did a lot of research on the script blocks (write native javascript in the event sheet). This opened up a whole new level of creating/development with C3. The limitations I thought existed, don't exist. It takes awhile to really get the hang of the 'Add script' blocks, but once you learn how to access global and local vars, get the instance of an object, add your own functions like 'globalThis.myfunction = (a, b) => {...}, and also call event functions from within a script block, it's just amazing. You can really do so much more than you thought you could. So to anyone who hasn't checked out/tried using script blocks, give it a go. They are a GREAT feature that just opens up the possibilities of what you can do in C3.

  • That was absolutely it! Thank you for taking the time to help me. Much appreciated!

  • So I've created a dialogue box that uses typewriter. It will display all text just fine, but when I try to print "[7xp]" it just doesn't print it. I'm sure it's something to do with the brackets. Any ideas? BTW, if I leave the leading or trailing bracket off it prints just fine.