Is there any ACS tutorial? - Solved -

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

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
Niphura
Posts: 192
Joined: Fri Jun 16, 2017 3:07 pm
Location: Argentina

Is there any ACS tutorial? - Solved -

Post by Niphura »

Basically what i want to learn in a tutorial is jump between states if (something happens with a script via acs) i've seen in a lot of mods that use acs something like this:
Spoiler:
Why there are so many states and why the lines jumpifinventory keep repeating in each state? I've been asking myself this for some time and I would like to know :?
Last edited by Niphura on Sat Dec 15, 2018 12:20 pm, edited 2 times in total.
User avatar
TheMightyHeracross
Posts: 2100
Joined: Sun Aug 18, 2013 9:41 am
Location: Philadelphia, PA

Re: Is there any ACS tutorial?...

Post by TheMightyHeracross »

That's not ACS, that's DECORATE, although the code does call a few ACS scripts.

I can't exactly tell what's going on because you didn't post the entire actor definition, but it looks like he's using a bunch of dummy inventory items to check the status of the player- I'm assuming "WaterSplash," "LavaSplash," etc have to do with causing liquid splash effects (like when you step in water, blood, lava, etc). Also, it looks like you get a dummy inventory item when you execute a fatality or grab a zombie to use as a meatshield, so it changes the player state accordingly.

Keep in mind that Sgt. Mark IV's code (since this appears to be Brutal Doom) is notoriously sloppy, and his mods are not exactly ideal references for learning DECORATE. If you want to learn, I suggest checking this ZDoom Wiki tutorial. After that, check out Wildweasel's Gunlabs tutorial page. It has a lot of useful information, particularly for weapon coding, and it helped me immensely when I was first learning.

Now, [wiki]DECORATE[/wiki], which is what you posted, is used for creating custom actors- monsters, weapons, items, player classes, decorative items, etc. [wiki]ACS[/wiki], on the other hand, handles scripting, events, HUD messages, and stuff like that, and was originally designed as Hexen's map scripting system. Its use has expanded a bit, since you can now autoload ACS scripts and call them from any map or from DECORATE. If you're going to make ZDoom mods, it's generally good to learn at least about both DECORATE and ACS, so you should check out [wiki]A quick beginner's guide to ACS[/wiki] from the ZDoom Wiki.
Post Reply

Return to “Scripting”