Combining Strife dialouge system with ACS code

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!)
MarkKirby
Posts: 1
Joined: Wed Mar 21, 2018 12:27 pm

Combining Strife dialouge system with ACS code

Post by MarkKirby »

I was working on a wad and I wanted to create a simple currency system and combine it with the dialouge system.

What I wanted to do was a simple variable

Code: Select all

int cash
cash = 0
Then simply increment this number when needed, as apposed top using a pick up

Code: Select all

cash = cash + 100
Easy, however, I cannot find a way to use the variable within the dialouge system.

What I would like to do is check the value of cash from the dialouge system and give an appropriate response if the number is high enough but for the life of me, I cannot seem to achive this.

Can any one help with this? or am I missing something here, like a built in currency? all examples I found, swapped items for other items but, as cash won't drop, I wanted to keep it really simple.

Any ideas?
User avatar
ramon.dexter
Posts: 1562
Joined: Tue Oct 20, 2015 12:50 pm
Graphics Processor: nVidia with Vulkan support
Location: Kozolupy, Bohemia

Re: Combining Strife dialouge system with ACS code

Post by ramon.dexter »

Just simple thing. Make the money an inventory item and you can use it freely with strife dialogue. No, you CANNOT use user variables from ACS in any way with the dialogue system. Still, you can use variables with the dialogue system. You just have to use inventory items as variables. Just make the items hidden and everything work as expected. If you have questions, ask me. I think I have lot of exprience with this weird script language.

Return to “Scripting”