npc barks

NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Locked
agentorangeguy
Posts: 565
Joined: Thu May 14, 2020 1:34 pm

npc barks

Post by agentorangeguy »

How do you make an npc say random barks when their schedule is patrol and they are currently standing on a path with the quality that is "call usecode"? I know how to schedule the barks during the patrol or any schedule, but i want the barks to be called only when the npc is on the path with "call usecode". for example:

path 0
path 1
path 3
path 4 "npc says random bark from list"
path 5
path 6, wrap to 0, etc...
-------------------------------------------------------------------------------------
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
Wizardry Dragon
Posts: 1241
Joined: Thu May 14, 2020 1:34 pm

Re: npc barks

Post by Wizardry Dragon »

There's plenty of examples of this in the TFL CVS :-)

http://u7feudallands.cvs.sourceforge.ne ... iew=markup

Basically all you have to do is test for the conditions within the NPC usecode.
--------
Peter M Dodge
aka Wizardry Dragon
www.thefeudallands.ca
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
agentorangeguy
Posts: 565
Joined: Thu May 14, 2020 1:34 pm

Re: npc barks

Post by agentorangeguy »

Hello, I check your site often, very informative! :) I looked at the link and can't figure out which to use for the path usecodes unless your talking about this part here:

Code: Select all

                 if (!UI_get_item_flag(item, 28)) bark = "@Hail to thee, Avatar.@";
 
                 else
 
                         bark = "@Hmm?@";
I don't know if that would be useful for the path objects though, unless you replace item with the corresponding path shape and then the number with the quality? I've looked several places but can't seem to find anywhere that mentions the path objects witht he quality 'call usecode'.
-------------------------------------------------------------------------------------
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
Wizardry Dragon
Posts: 1241
Joined: Thu May 14, 2020 1:34 pm

Re: npc barks

Post by Wizardry Dragon »

You just have to use conditionals. Another run-around sort of way would be to make a proximity egg that resets that hatches and makes the NPC say whatever.
----------
Peter M Dodge
aka Wizardry Dragon
www.thefeudallands.ca
Cheers, Wizardry Dragon
Lead Designer, Ultima VII: The Feudal Lands
www.thefeudallands.ca
Locked