Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
Joined: Nov 2017
Location: Australia
Raal Offline OP
stranger
OP Offline
stranger
Joined: Nov 2017
Location: Australia
I've been making some progress which has been great, but still a few things I'm having trouble with =/. The main questions currently being -

1) What's the best method for displaying debug text? For example, using the DisplayText call? Or is something else better used? Currently was looking to display the name of the ITEMGUID (Item) that had been recently used by the player.

2) I'm sending a character to a PointTrigger via a ProcCharacterMoveTo() call after a Dialog event, however, I'd like to also be able to set the direction they are facing once they arrive there. I could use a 2nd PointTrigger to achieve this but was wondering if there are any other advised methods?

3) How to get the GLO_AD_ShovelFailed dialog to start for a hidden dirt pile that is empty?

So far, I've been able to start this dialog after the StoryEvent(_Player,"digmound") event, which I saw was created after the dig animation completed. However, have been having trouble to only get it to start on the specific dirt pile and not on any of the other 2 dirt piles, empty or not =/.

The current code I've been using is below

Code
//After Dig
IF
StoryEvent(_Player,"digmound")
AND
NOT DB_Shovelling_Mound((CHARACTERGUID)_Player,_)
AND
DB_TV_LastDugPile(ITEMGUID_S_TV_SandPile_003_a55808f1-39a1-42ae-9a83-8112079c0573)
THEN
Proc_StartDialog(1,"GLO_AD_ShovelFailed", _Player);


Joined: Nov 2017
L
member
Offline
member
L
Joined: Nov 2017
1) Displaytext is the most practical in most cases, but not always. What specifically are you trying to debug?
DebugBreak or Assert (depending on whether you're working in Osiris or Story) shows up in the error log of your editor.
Alternatively, you may be able to find the information for which you're looking in the Osiris log or the behaviour script debugger.

2) Your solution is a possible one, and may be the best one.
An alternative is to use CharacterLookFromTrigger using you destination trigger to determine the direction in which the character looks. You can see what direction that is by selecting the point trigger and pressing ctrl-alt-T or toggling the "Selected Trigger Shapes" option in the View menu.
If you've got several characters walking to the same trigger but then looking in different directions, using additional point triggers and CharacterLookAt may indeed be better. You can also just have your character look at an in-game object (a character or dynamic item).

3) It's probably best to define a new database like
Code
DB_ShovelRewardEmpty((STRING)_Reward)

and add a
Code
PROC
ProcShovelRewards((CHARACTERGUID)_Player,(STRING)_Reward)
AND
DB_ShovelRewardEmpty((STRING)_Reward)
THEN
Proc_StartDialog(1,"GLO_AD_ShovelFailed", _Player);


It may seem intuitive to check on whether the _Reward identifier is in none of the DB_ShovelReward* databases when it's dug up, but the case may be that the ProcShovelReward procedure is overloaded for a particular mound, and then your character will have the GLO_AD_ShovelFailed AD even though they've found something.


Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5