Page 121 of 123

Re: ZScript Discussion

Posted: Mon Jun 05, 2017 11:33 am
by Major Cooke
That's pretty much the easiest way to debug, by printing out the variable. Here's a page you can use to convert from many types to a string for printing if needed.

Re: ZScript Discussion

Posted: Tue Jun 06, 2017 4:58 am
by Illasera
Major Cooke wrote:That's pretty much the easiest way to debug, by printing out the variable. Here's a page you can use to convert from many types to a string for printing if needed.
Well i guess i will have to deal with it with that method, not exactly what i had in mind but if there are no other ways, that will do.
Thank you.

Re: ZScript Discussion

Posted: Sat Jul 01, 2017 3:49 pm
by Blue Shadow
From here:
Graf Zahl wrote:No. Do not move Tick to DoEffect. The code must still be called from the player's Tick() function. The calling semantics, even though similar, are not identical.
I'd like to know the difference between the two, please.

Re: ZScript Discussion

Posted: Sun Jul 02, 2017 1:19 am
by Marrub
Is there any way to add an event handler without MAPINFO? I can't add such a thing because it needs to work in earlier versions where ZScript (and thus event handlers) didn't exist.
There is an EventHandler.Create function mentioned in a comment, but no such function actually exists.

Re: ZScript Discussion

Posted: Sun Jul 02, 2017 3:37 am
by Graf Zahl
Blue Shadow wrote: I'd like to know the difference between the two, please.

DoEffect is called from the owner's Tick function to ensure that all is done in a defined order. If you do some bookkeeping in there it may get mixed with other DoEffect functions by real inventory items so that the actual state of the player may only be partially affected by them when your function gets called.

Re: ZScript Discussion

Posted: Wed Jul 05, 2017 6:14 am
by Major Cooke
Marrub wrote:Is there any way to add an event handler without MAPINFO? I can't add such a thing because it needs to work in earlier versions where ZScript (and thus event handlers) didn't exist.
There is an EventHandler.Create function mentioned in a comment, but no such function actually exists.
Nope and nope.

Re: ZScript Discussion

Posted: Wed Jul 05, 2017 2:01 pm
by Marrub
Major Cooke wrote:
Marrub wrote:Is there any way to add an event handler without MAPINFO? I can't add such a thing because it needs to work in earlier versions where ZScript (and thus event handlers) didn't exist.
There is an EventHandler.Create function mentioned in a comment, but no such function actually exists.
Nope and nope.
Okay. Can you explain why EventHandler.Create doesn't exist anymore? It would be quite useful right now.

Re: ZScript Discussion

Posted: Thu Jul 06, 2017 7:53 am
by Marrub
Nevermind that, apparently MAPINFO ignores unknown properties, so I can use it anyway.

Re: ZScript Discussion

Posted: Thu Jul 06, 2017 8:59 am
by UsernameAK
How to send a netevent by activating a linedef?

Re: ZScript Discussion

Posted: Fri Jul 07, 2017 2:54 am
by Graf Zahl
At the moment you cannot define any direct interactions between a linedef trigger and ZScript so you have to go through ACS and call a custom ZScript function through there.

Re: ZScript Discussion

Posted: Fri Jul 07, 2017 3:27 am
by UsernameAK
Graf Zahl wrote:At the moment you cannot define any direct interactions between a linedef trigger and ZScript so you have to go through ACS and call a custom ZScript function through there.

Code: Select all

Line 25 in file "/tmp/SLADE3/SCRIPTS.acs" ...
/tmp/SLADE3/SCRIPTS.acs:25: Function scriptcall is used but not defined.
Well, how to get this function?

Re: ZScript Discussion

Posted: Fri Jul 07, 2017 3:52 am
by Gutawer
You'll need an ACS compiler that's up-to-date enough to support it. I'd recommend gdcc-acc, it comes with multiple benefits over normal acc: viewtopic.php?f=44&t=32078

Re: ZScript Discussion

Posted: Fri Jul 07, 2017 7:20 am
by Major Cooke
Graf, is it safe to introduce our own STAT_ numbers for thinkers? (I.e. using 7 for a stat number) Also, is there a set range for thinkers where the Tick function is not automatically called, besides 1 through 6 (STAT_INFO to STAT_STATIC)

Re: ZScript Discussion

Posted: Fri Jul 07, 2017 8:36 am
by UsernameAK
Gutawer wrote:You'll need an ACS compiler that's up-to-date enough to support it. I'd recommend gdcc-acc, it comes with multiple benefits over normal acc: viewtopic.php?f=44&t=32078

Code: Select all

special -210:ScriptCall(5);
I have just wrote this in my code

Re: ZScript Discussion

Posted: Tue Jul 11, 2017 5:02 am
by UsernameAK
How to check for ZScript support thru ACS and use a fallback way if it isn't supported?