Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
#548367 27/08/14 07:45 AM
Joined: Aug 2014
P
Platuni Offline OP
stranger
OP Offline
stranger
P
Joined: Aug 2014
Basically, you get the choice of killing an npc or letting her live early in my quest mod.
This affects two different endings.
Here's some of the code I used:
(The AND Global events are activated when you make your decision)

IF
MovieFinished("TACredits.bik")
THEN
ProcEnding();


// First ending

PROC
ProcEnding()
AND
GlobalEventSet("EndingLive")
THEN
MoviePlay(CHARACTER_Player1,"1yearlater.bik");
CharacterMakePlayer(CHARACTER_illitisPlayer);
GlobalSetEvent("DisableParty1");


// Second ending

PROC
ProcEnding()
AND
GlobalEventSet("Endingdead")
THEN
MoviePlay(CHARACTER_Player1,"10years.bik");
CharacterMakePlayer(CHARACTER_Elie1);
GlobalSetEvent("DisableParty2");


My problem is this error:
'Global event set': DIV event allowed only as a first condition of a rule


Any suggestions how I can get this working?

Joined: Jul 2014
enthusiast
Offline
enthusiast
Joined: Jul 2014
You're running into the issue wherein Global Events are only read by Osiris when they fire, they're not stored as a state anywhere (Event is true vs event is false). So you need some extra code to be toggled when the events are applied so that you can then call on that toggled value during your closing code.

Take a look at this thread, which goes into using database deletion or VarIntegers to achieve what you're after, then ask more questions here if you still run into trouble.

http://www.larian.com/forums/ubbthreads.php?ubb=showflat&Number=546652#Post546652

smile

Last edited by Noaloha; 27/08/14 07:53 AM.

Escape From Smalcatraz: Steam/Nexus. Forum thread.
Joined: Aug 2014
P
Platuni Offline OP
stranger
OP Offline
stranger
P
Joined: Aug 2014
I appreciate the fast reply!
Thanks, I will read that post smile

Joined: Aug 2014
P
Platuni Offline OP
stranger
OP Offline
stranger
P
Joined: Aug 2014
Update:

VarIntegers did the job!

IF
MovieFinished("TACredits.bik")
THEN
ProcEnding();


// First ending

PROC
ProcEnding()
AND
CharacterGetVarInteger(CHARACTER_Player1, "EndingLive", 1)
THEN
MoviePlay(CHARACTER_Player1,"1yearlater.bik");
CharacterMakePlayer(CHARACTER_illitisPlayer);
GlobalSetEvent("DisableParty1");


// Second ending

PROC
ProcEnding()
AND
CharacterGetVarInteger(CHARACTER_Player1, "Endingdead", 1)
THEN
MoviePlay(CHARACTER_Player1,"10years.bik");
CharacterMakePlayer(CHARACTER_Elie1);
GlobalSetEvent("DisableParty2");

Joined: Jul 2014
enthusiast
Offline
enthusiast
Joined: Jul 2014
[Linked Image]


Escape From Smalcatraz: Steam/Nexus. Forum thread.

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