Problem with Dialogue

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.

Re: Problem with Dialogue

Postby Dan_The_Noob » Mon Feb 10, 2020 6:02 pm

I think instead of "IFITEM" you may need to use "REQUIRE"
like in this picture?
https://i.imgur.com/wKg9HlEl.png

from what i can tell, IFITEM is to allow you to use "link = #" to skip a dialog if you have an item already?

they use IFITEM to check for rocketlauncher to skip to the next page

--EDIT--

So basically. you would put the code like this or something?

Code: Select allExpand view
namespace = "ZDoom";
include = "SCRIPT00";

conversation
{
   actor = "MAvatar";
   page
{
      name = "You got a Fragment of Mahat";
      dialog = "Please choose a skill that you just remembered";
      goodbye = "I'll think about...";
      //SorAttSkill
     
      choice
{
         text = "Sorcerer Spell Skill Maxed";
         closedialog = false;
         require
{
               item = "SorAttSkill3";
}
       choice
{
         text = "+1 Sorcerer Spell";
         yesmessage = "You got a new spell: Fireball";
         giveitem = "Fireball";
         giveitem = "SorAttSkill3";
         cost
{
            item = "SorAttSkill2";
            amount = 1;
}
}
}
}
}
User avatar
Dan_The_Noob
Global Moderator
 
Joined: 07 May 2019
Twitch ID: Dan_The_Noob
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia with Vulkan support

Re: Problem with Dialogue

Postby Alpha42 » Wed Feb 12, 2020 4:07 pm

Ah thank you very much!
I'll try it!
Alpha42
Global Moderator
 
Joined: 12 Dec 2019
Github ID: https://github.com/alpha42z
Operating System: Windows Vista/7 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Not Listed

Re: Problem with Dialogue

Postby Alpha42 » Wed Feb 12, 2020 4:09 pm

by the way, do you know how many time this topic still open? I can't code today and tomorrow, so I can't fix my code and test it. I would come back here if something go wrong...
Alpha42
Global Moderator
 
Joined: 12 Dec 2019
Github ID: https://github.com/alpha42z
Operating System: Windows Vista/7 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Not Listed

Re: Problem with Dialogue

Postby Alpha42 » Fri Feb 14, 2020 1:00 pm

Still crashing...

DIALOGUE:
Spoiler:


Error message (in ZDoom console):
Spoiler:
Alpha42
Global Moderator
 
Joined: 12 Dec 2019
Github ID: https://github.com/alpha42z
Operating System: Windows Vista/7 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Not Listed

Re: Problem with Dialogue

Postby Alpha42 » Fri Feb 14, 2020 1:03 pm

I'd try both: require and cost with and without "amount"
In the dialogue, the goodbye message is the only option that I have :(
Alpha42
Global Moderator
 
Joined: 12 Dec 2019
Github ID: https://github.com/alpha42z
Operating System: Windows Vista/7 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Not Listed

Re: Problem with Dialogue

Postby Dan_The_Noob » Fri Feb 14, 2020 3:57 pm

that crash is weird, i don't know why it would be expecting a '='
User avatar
Dan_The_Noob
Global Moderator
 
Joined: 07 May 2019
Twitch ID: Dan_The_Noob
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia with Vulkan support

Re: Problem with Dialogue

Postby Alpha42 » Sat Feb 15, 2020 10:46 am

maybe the Zdoom don't run right the dialogue?
I'm using the old classic ZDoom version. I read in the wiki, and there said the Zdoom supports DIALOGUE. But I think don't run well...

But thank you anyway...
Do you know another way to make a MENU? Early, I was create a script that make the same that DIALOGUE: show options to select. So, the problem is: I don't want a button to choice, I want a arrow that you can control with the keyboard arrows, like in DIALOGUE.

I'm thinking to come back to my menu with strange buttons for while (or until I can solve this problem)
Alpha42
Global Moderator
 
Joined: 12 Dec 2019
Github ID: https://github.com/alpha42z
Operating System: Windows Vista/7 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Not Listed

Re: Problem with Dialogue

Postby Alpha42 » Mon Feb 17, 2020 2:08 pm

Please someone?
:(
Alpha42
Global Moderator
 
Joined: 12 Dec 2019
Github ID: https://github.com/alpha42z
Operating System: Windows Vista/7 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Not Listed

Previous

Return to Scripting

Who is online

Users browsing this forum: No registered users and 1 guest