Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
#527178 25/07/14 09:05 AM
Joined: Jul 2014
member
OP Offline
member
Joined: Jul 2014
Hey guys i've just been messing around with the story editor and im having trouble getting something accomplished. Curious if anyone else can help me out or knows how to do this.

Basically in the intro scene(After character creation) i'm wanting to have the main characters stripped of the starting gear and placed into a chest outside of a jail cell.

Currently i'm trying to use it in this way.

IF CharacterLeftRegion(CHARACTER_Player1,"CharacterCreation")

THEN
CharacterMoveAllItemsToContainer(CHARACTER_Player1, ITEM_FUR_Chest_A_000);

I know the IF triggers properly because i also have a teleport on the second player to a different jail cell and it executes fine. But for whatever reason it refuses to transfer the items off.

Any help would be much appreciated

Also should note I mostly know what im doing with a lot of this.. as far as any stupid errors like definitions not being set and what not. I've been referencing the jail story script in the main editor however theres so many alias and methods that i assume are being referenced in other scripts that i really dont have time to reverse engineer it to see how it all works.

Last edited by Demonata08; 25/07/14 09:17 AM.
Joined: Jul 2014
member
OP Offline
member
Joined: Jul 2014
If someone would experiment with the feature and get it working, then walk me through it. I'd be willing to tip someone 5 dollars us on paypal.

Joined: Jul 2014
R
apprentice
Offline
apprentice
R
Joined: Jul 2014
You're missing an argument. You need to call:

CharacterMoveAllItemsToContainer(CHARACTER_Player1, ITEM_FUR_Chest_A_000, 0);

When you're typing the function, the little grey bar at the top will tell you what variables you need if it's a built in function. The main story does use the two variable version, but it defines it's own function like so:

PROC
CharacterMoveAllItemsToContainer((CHARACTER)_Char,(ITEM)_Dest)
THEN
CharacterMoveAllItemsToContainer(_Char,_Dest,0);

Joined: Jul 2014
member
OP Offline
member
Joined: Jul 2014
Ah yeah i did notice the gray bar and have been using it. I was referencing the prison scripts and saw the two variable version and went with that.

Ill give it a try in a bit, you can pm me a paypal if you want that tip! Thanks smile

Joined: Jul 2014
enthusiast
Offline
enthusiast
Joined: Jul 2014
I wasn't sure whether to make a new thread for this. Better to have one big thread for small/specific scripting questions, or better to have a multitude of threads, each with their own separate questions and answers? I don't know!

Anyway.

Is there a reason I'm not seeing all the scripts listed on this wiki page show up?
http://www.divinityengine.net/index.php?title=List_of_scripting_commands

Specifically, I'm trying to get the game to recognise

Code
CharacterWander (FLOAT|TRIGGER range, FLOAT durationInSeconds [, INT run, GAMEOBJECT anchor])
Wander around for a certain time


as specified on that page.

But Osiris doesn't seem to recognise it.

is there a known issue where Osiris doesn't bring in all predefined commands, or am I missing something?

For the record, my mini-goal here is to get an idle NPC to start running around randomly when they get set on fire. So I was trying to set up something along the lines of

IF
a specific NPC gains status 'burning'
THEN
that NPC will start wandering around

If anyone has any ideas on how to achieve that, hit me up!


Escape From Smalcatraz: Steam/Nexus. Forum thread.
Joined: Jul 2014
R
addict
Offline
addict
R
Joined: Jul 2014
Noaloha, the answer to your question most likely resides in .charScript/.itemScript editing rather than the Story script editing (which uses different syntax/commands) this thread is concerned with.

That being said, I reckon that the character's CharScript would look like this-

Code
INIT

CHARACTER:__Me

EVENTS

EVENT HelpHelpFireFire
ON
	OnDamage(Fire,_,_,_)
ACTIONS
	IF "!c1"
		CharacterHasStatus(__Me,BURNING)
	THEN
		CharacterApplyStatus(__Me,BURNING)
		
		CharacterWander (3, 3)
	ENDIF


You can look at the Torch.itemScript for how to trigger stuff with fire and burning.


Edit: The reason the CharacterWander command isn't showing up in Story editing is because it's a .charScript command. All of the commands listed in that page you linked to are .charScript/.itemScript commands.

Edit #2:
For Story editing, it appears that all of the functions (or at least, their names and what arguments are necesssary for using them) are defined in the story_header.div in the Data/Mods/Main/Story/RawFiles folder. Most of these aren't on the Wiki (and the arguments for them are definitely not on there yet)

Last edited by Rhidian; 28/07/14 09:41 PM.
Joined: Jul 2014
enthusiast
Offline
enthusiast
Joined: Jul 2014
Ooooh, crap. I never even made the (now obvious to me) distinction between 'script' as in the character script files and script/code that you'd use in the Story Editor. That would definitely explain why the entries on the Wiki page I linked to weren't appearing where I expected. As you may or may not have noticed by now, I'm very, very new to all this. :P

I'll deal with my intended NPC-reactive "I'm on fire, aaagh" issue another day. I'm only just managing to wrap my head around the Script Editor stuff -- I think I'd just get a headache if I also started experimenting with .char/itemScripts, ha. Another day!

On a more positive note, I did manage to use Story Editor today to set the following up get it to actually work:
https://www.youtube.com/watch?v=QMnPdY5lTB0

smile


Escape From Smalcatraz: Steam/Nexus. Forum thread.

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