Strife dialog scripts and ACS

From ZDoom Wiki
Jump to navigation Jump to search

In order to compile Strife dialog scripts, you will need a compiler, such as KSSC or USDC. This article explains how to integrate these scripts further into ZDoom and ACS.

A quick tip for linking Strife Dialog and ACS

Have a decorate item set up like this:

   Actor ACSQuestItem : CustomInventory
   {                             
   ConversationID 10              //You can use any ConversationID from 0 to 999.
   States
   {
   Pickup:
       TNT1 A 0 ACS_Execute(900,0)
       Stop
   }

Have an option in your Strife Dialog script (here in KSSC syntax) with the following information:

   #--OPTION-- 
   { 
   GIVEMOBJ 10 #Gives the player the ACSQuestItem when they select this option.
   TEXT &Selecting this option will trigger a looping CheckInventory script.& 
   YESTEXT _ 
   }

And have a looping ACS script like this:

   Script 900 (void)
   { 
       Stuff; 
   }

Using this method, you can have an option such as "Open the door, now!" and use ACS to open the door for you (this is obviously not a good example since you can use the door specials directly in the pickup state without using ACS at all, but whatever...).

However, this method opens up flexibility with events: Rather than simply open the door, you could open the door, have the person you're talking to walk through it and shoot some badguys.

Also, there is the possibility to randomize generic responses to give your characters a bit more depth, using something like this:

   Script 900 (void)
   {
       ActivatorSound("RANDOM/sound", 127);
   }

Where "RANDOM/sound" is of course a random sound as defined in SNDINFO.

When you link them to ACS, Strife Dialog scripts become quite powerful and flexible, and they are easy to implement once you are used to them. The range you are limited to on ConversationID's is 0-999.