gmc icon indicating copy to clipboard operation
gmc copied to clipboard

improve C_Trigger usage example

Open the-overdriven opened this issue 4 months ago • 1 comments

The current example is incomplete and not working in game.

I've copy-pasted an extended working example from GMC discord by @auronen.

Added a few minor improvements:

  • fixed trigger variable names (use trigger only, not trigger and SelfTrigger)
  • removed delay acceleration (for the sake of basic example it was adding unnecessary complexity and can cause "Divide by Zero" error if delay drops below 0)
  • renamed ambiguous c_loop to poison_me_loop

the-overdriven avatar Aug 06 '25 10:08 the-overdriven

Thanks for the contribution. hmm, you're defining the class yourself in Daedalus.

I recalled a similar comment on Discord here where Gratt mentioned the After option:

META {
  After = zUnionTrigger.d; // include triggers api
  Using = zParserExtender; // using std namespace
};

However, idk if zUnionTrigger.d is part of Union or not maybe it needs to be defined by the user with the snippet above 🤔 Was this case also considered? I saw Gratt commenting in "more recent" threads, but it was never mentioned again, so it could be patched out 🤔

kamilkrzyskow avatar Sep 24 '25 16:09 kamilkrzyskow