Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
Joined: Sep 2017
X
Xaelyn Offline OP
journeyman
OP Offline
journeyman
X
Joined: Sep 2017
I want my script to be able to fire on a game that is in progress, but I want the script to only fire once. I know I can set a global or object flag in the script, but I can't find a way to only run the script if the flag is not yet set.
Does anyone know a way to do it?

Joined: Sep 2017
veteran
Offline
veteran
Joined: Sep 2017
I have this script that works nicely for my needs. Basically what it does is, if the player steps into the area, it applies slowed and bleeding to them unless they have the desert gear.

IF
CharacterEnteredTrigger(_Player,TRIGGERGUID_DC_AllDesertAuraQuest_f74d0900-e3dd-4fa2-ac5e-28e2a20b1095)
AND
IsTagged(_Player,"DC_HasDesertGear",0)
THEN
ApplyStatus(_Player,"SLOWED",-1.0,1);
ApplyStatus(_Player,"BLEEDING",-1.0,1);
DisplayText(_Player,"Ouch! These winds are dreadful! The sand rips at my skin!");

That checks if the player don't have 'DC_HasDesertGear' tag. (_Player,"TAG",0=Dont have, 1=have tag)

Perhaps you can derive something from that?

Example:

IF
GameStarted("YourLevel",0)
AND
IsTagged(_Player,"NotStarted",0)
THEN
YourScript(_Player,"CoolStuff",1);
SetTag(_Player,"NotStarted");



Joined: Sep 2017
X
Xaelyn Offline OP
journeyman
OP Offline
journeyman
X
Joined: Sep 2017
Thanks, that SetTag and IsTagged is exactly what I needed!

Joined: Sep 2017
veteran
Offline
veteran
Joined: Sep 2017
Great! laugh


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