Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
#533984 01/08/14 06:04 AM
Joined: Jul 2014
member
OP Offline
member
Joined: Jul 2014
Hey guys. I just was trying to get a character to do a basic thing like walking to a trigger. I cant get him to budge even in story editor.

But i know you should use a CharScript and he just wont move. I'll link what i have and maybe someone can tell me the problem.

#INCLUDE State_Manager

INIT

USING State_Manager
CHARACTER:__Me
TRIGGER:%Guard = Guard1_dbd403c5-0d1e-49bd-9368-09734f48ef74


BEHAVIOUR
REACTION State_ActionManager, 0
USAGE PEACE
ACTIONS
CharacterMoveTo(%Guard,1)

Pretty basic but i dont understand the usage on everything.. refering to other scripts i dont know.

Thanks guys.

EDIT: or if anyone knows a way to get a npc moving i'd appreciate it.

I'm trying to get a patrol type walk going.

Last edited by Demonata08; 01/08/14 06:30 AM.
Joined: Jul 2014
member
OP Offline
member
Joined: Jul 2014
Also worth noting everytime i do a new script and attach it to a character it seems to do nothing. then when i restart the client it replaces my script with some random jumble of words and gives me an error about it.

Joined: Jul 2014
enthusiast
Offline
enthusiast
Joined: Jul 2014
I have an NPC who, upon gaining the status 'Burning', will proceed to run around in a 'circle' between three point triggers. I used the Story Editor, rather than the .charScript. The code I mashed together in the KB section is:

Code
IF
CharacterStatusChange(CHARACTER_EFS_GaolGuard,"Burning")
THEN
CharacterMoveToTrigger(CHARACTER_EFS_GaolGuard,TRIGGER_Burn1,1,"onfire1");

IF
CharacterEvent(CHARACTER_EFS_GaolGuard,"onfire1")
THEN
CharacterMoveToTrigger(CHARACTER_EFS_GaolGuard,TRIGGER_Burn2,1,"onfire2");

IF
CharacterEvent(CHARACTER_EFS_GaolGuard,"onfire2")
THEN
CharacterMoveToTrigger(CHARACTER_EFS_GaolGuard,TRIGGER_Burn3,1,"onfire3");

IF
CharacterEvent(CHARACTER_EFS_GaolGuard,"onfire3")
THEN
CharacterMoveToTrigger(CHARACTER_EFS_GaolGuard,TRIGGER_Burn1,1,"onfire1");


I don't know if you could use something similar to set up your patrol route.

Last edited by Noaloha; 01/08/14 10:19 AM.

Escape From Smalcatraz: Steam/Nexus. Forum thread.
Joined: Jul 2014
R
addict
Offline
addict
R
Joined: Jul 2014
If I'm not mistaken, your character's reaction priority is set to 0, which means it's never going to be called unless something else makes its priority greater than 0. Setting the priority to 0 is generally what is done after the behavior has occurred so that it doesn't occur again (unless it's raised by something else).

Joined: Jul 2014
member
OP Offline
member
Joined: Jul 2014
Ill change up the priority and see if it does anything. Currently i cant seem to get him to move even through story editor.. really strange.


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