Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
Joined: Sep 2017
T
Taedin Offline OP
stranger
OP Offline
stranger
T
Joined: Sep 2017
So, I'm making a map for GM Mode, and there's this hatch. It leads to another area in the same map. Ideally what I want is for the hatch to be invisible or otherwise not present until the party flips a nearby switch. I'm almost certain that this is incredibly simple, but I am utterly lacking any sort of scripting knowledge. If anyone knows how to do this and is willing to explain as if to a small child, I would be supremely grateful!

Joined: Sep 2017
veteran
Offline
veteran
Joined: Sep 2017
Put SetOnStage(ITEMGUID_TheHatch, 0); in the INIT section of a Story Goal, then put this in the KB section:

IF
CharacterUsedItem(_Player, ITEMGUID_Lever)
THEN
SetOnStage(ITEMGUID_TheHatch, 1);
PlayEffect(ITEMGUID_TheHatch, "RS3_FX_UI_PerceptionReveal_01");
PlaySound(ITEMGUID_TheHatch,"UI_Game_PerceptionReveal_Puzzle");

It'll make the hatch appear, and play the sound and visuals similar to if you discover a hidden dirtpile etc.

Joined: Sep 2017
T
Taedin Offline OP
stranger
OP Offline
stranger
T
Joined: Sep 2017
Thanks! I was having trouble making it work, until I tried 'building' the story. (Again, total noob) This was driving me nuts, thanks a lot for the help!

Joined: Sep 2017
T
Taedin Offline OP
stranger
OP Offline
stranger
T
Joined: Sep 2017
So now I'm facing a similar but rather more complex situation. My current map has four rotating segments, which I have made work by having four different versions of the map that they teleport between every time the sections "rotate." One room of the dungeon has these four orbs that can be used to teleport to different rooms in the dungeon, UNLESS a switch is flipped, in which case they all teleport directly into a prison cell.

It's easy enough to get the orbs to send them to the four rooms, but I can't figure out how to get them to switch to a different destination, not to mention that the switch needs to apply to all of the versions of these orbs in the four maps.

Any ideas?

Joined: Nov 2017
L
member
Offline
member
L
Joined: Nov 2017
You'll have to handle teleportation from Story, which means you'll have to change the Use Action from "Teleport" to "Send a use action to Osiris" and put the logic into Osiris, along these lines:

Init:
Code
DB_RotatingDungeon_Teleporters(0, <Orb 1-1>, <Trigger 1-1>);
DB_RotatingDungeon_Teleporters(0, <Orb 2-1>, <Trigger 2-1>);
DB_RotatingDungeon_Teleporters(0, <Orb 3-1>, <Trigger 3-1>);
DB_RotatingDungeon_Teleporters(0, <Orb 4-1>, <Trigger 4-1>);
DB_RotatingDungeon_Teleporters(0, <Orb 1-2>, <Trigger 1-1>);
DB_RotatingDungeon_Teleporters(0, <Orb 2-2>, <Trigger 2-1>);
DB_RotatingDungeon_Teleporters(0, <Orb 3-2>, <Trigger 3-1>);
DB_RotatingDungeon_Teleporters(0, <Orb 4-2>, <Trigger 4-1>);
[...]
DB_RotatingDungeon_Teleporters(1, <Orb 1-1>, <Trigger 1-2>);
DB_RotatingDungeon_Teleporters(1, <Orb 2-1>, <Trigger 2-2>);
[...]
DB_RotatingDungeon_Teleporters(4, <Orb 4-4>, <Trigger 4-5>);

DB_RotatingDungeon_State(0);


and then use it with:
Code
IF
CharacterUsedItem(_Player, _Orb)
AND
DB_RotatingDungeon_Teleporters(_State, _Orb, _Destination)
AND
DB_RotatingDungeon_State(_State)
THEN
CharacterTeleportTo(_Player,  _Destination);


IF
CharacterUsedItem(_, <Switch>)
AND
DB_RotatingDungeon_State(_OldState)
AND
IntegerSum(_OldState, 1, _NewState)
THEN
NOT DB_RotatingDungeon_State(_OldState);
DB_RotatingDungeon_State(_NewState);

IF
DB_RotatingDungeon_State(5)
THEN
NOT DB_RotatingDungeon_State(5);
DB_RotatingDungeon_State(0);


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