Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
#625204 02/10/17 05:22 PM
Joined: Oct 2017
P
apprentice
OP Offline
apprentice
P
Joined: Oct 2017
Hi,

j'essaye de faire qu'un combat puisse se déclencher avec un flag de dialogue, mais je n'y arrive pas. Je n'ai pas d'erreur de build, mais rien ne se passe
[quote]DB_CombatCharacters("CHARACTERGUID_cheffouzonededepart_98b620be-639b-4159-b2bf-31d13a09eeb7","c5865eac-a8bf-4506-9715-e6fa664c7c17", 1);

-----

IF
ObjectFlagSet("CombatDialogue", _Speaker, _)
THEN
GoalCompleted;

[/quote]
[img]http://image.noelshack.com/fichiers/2017/40/1/1506964699-1.jpg[/img]

my characterguid is the good and the id and that of the npc

thank you in advance for your help

Joined: Oct 2017
P
apprentice
OP Offline
apprentice
P
Joined: Oct 2017
Sorry for my first post,

I try to make a combat trigger with a dialogue flag, but I can not. I do not have a build error, but nothing happens

[quote]DB_CombatCharacters("CHARACTERGUID_cheffouzonededepart_98b620be-639b-4159-b2bf-31d13a09eeb7","c5865eac-a8bf-4506-9715-e6fa664c7c17", 1);

-----

IF
ObjectFlagSet("CombatDialogue", _Speaker, _)
THEN
GoalCompleted;[/quote]


[img]http://image.noelshack.com/fichiers/2017/40/1/1506964699-1.jpg[/img]

my characterguid is the good and the id and that of the npc

thank you in advance for your help

Joined: Jun 2013
old hand
Offline
old hand
Joined: Jun 2013
So I think you've got some mistakes in places. DB_CombatCharacters keeps track of which characters are in combat, you do not need to set this manually in the iNIT the shared scripts will do it for you.

One of the main reasons combat doesn't start right is an alignment issue.


I'm not terribly familiar with the dialog editor, is the flag "CombatDialogue" your creation or one of the included flags?

If it's your creation, I think you should do it in this way:

IF
DialogEnded("YOUR DIALOG NAME",_)
AND
ObjectGetFlag(THE NPC INVOLVED,"CombatDialog",1)
THEN
SetFaction(THE NPC INVOLVED,"Evil NPC");


I would set the object flag on the NPC, not the player.

SetFaction() is a shortcut to starting combat, there are more proper ways to do it but I don't think they work straight off with the shared scripts.

Make sure to set your player character to Good NPC as an alignment.


If you have your own alignment file or are using the one from Origins, just adjust the alignments I put above to fit what you are doing.

And with the above script, is the flag is 0, combat won't start.

Last edited by SniperHF; 03/10/17 06:18 AM.
Joined: Oct 2017
P
apprentice
OP Offline
apprentice
P
Joined: Oct 2017
Thank you for your help! it works very well, now I have more than found for it to trigger a combat group

Joined: Oct 2017
P
apprentice
OP Offline
apprentice
P
Joined: Oct 2017
Hello, is there a way to bring several enemies into a fight as a result of a dialogue?

Joined: Oct 2017
P
apprentice
OP Offline
apprentice
P
Joined: Oct 2017
I found, so if needed also need help to have several people in the comnbat group after dialogue, put the bandits in Evil NPC and range of vision to 1, the person in the dialogue in neutral good npc and of course in a group.

That way, if you trigger the combat via the doalogue, the other enemies will be in it and if the combat is triggered via other enemies without dialogue, the character who has the doalgues will also be enemy in the group

Joined: Oct 2017
Location: United Kingdom
journeyman
Offline
journeyman
Joined: Oct 2017
Location: United Kingdom
Set a flag in dialog called ATTACK

Then make a script:

[code]IF
ObjectFlagSet("ATTACK", _Player, _)
THEN
CharacterMoveTo(CHARACTERGUID_baddy_ID,_Player,1,"",0);
[/code]

This will make an enemy move to attack you after the dialog ends. Replacing the CHARACTERGUID with that of the enemy. You could also teleport them.

Joined: Sep 2017
M
member
Offline
member
M
Joined: Sep 2017
you could also create combat group smile


Moderated by  Larian_KVN 

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