Is it possible to run ACS from zscript?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
Duvo
Posts: 47
Joined: Thu Dec 26, 2019 4:17 am

Is it possible to run ACS from zscript?

Post by Duvo »

Hi Everyone, I have a monster created through zscript. I'd like to run some ACS whenever it fires:

zscript:

Code: Select all

Missile:
		POSS E 1 ACS_ExecuteAlways(44);
ACS:

Code: Select all

script 44 (void){
	Print(s:"It worked!");
}
while it doesn't throw any errors, it doesn't work either. is there a way to make this happen?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Is it possible to run ACS from zscript?

Post by Graf Zahl »

'Print' prints to the caller's screen - but a monster has none. You need to use 'printbold' instead.
User avatar
Duvo
Posts: 47
Joined: Thu Dec 26, 2019 4:17 am

Re: Is it possible to run ACS from zscript?

Post by Duvo »

Thanks @Graf
Post Reply

Return to “Scripting”