Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
#623030 28/09/17 01:52 PM
Joined: Sep 2017
Location: Finland
Rasikko Offline OP
journeyman
OP Offline
journeyman
Joined: Sep 2017
Location: Finland
Trying to introduce my brain to Osiris. I've been stuck on this...well I forgot how long now.

This is the base script: All I did was override the original(script resource, etc) and included my script and have base use my script.
Code
#INCLUDE FirstScript

INIT
	CHARACTER:__Me
	CHARACTER:%LookAtChar
	CHARACTER:%AttackOfOpportunity
	ITEM:%LookAtItem
	INT:%FearFlee
	INT:%Following = 0
	FIXEDSTRING:%PrevIdleAnim = ""
	FIXEDSTRING:%CrawInfest_Faction = ""
	EXTERN INT:%FleeFromDangerousSurface=1
	EXTERN INT:%bool_CanChickenFlee=1
	
	USING FirstScript



And this is my script:
Code
INIT
	CHARACTER:__Me
	
EVENTS
EVENT FirstScriptEvent

ON
	OnSkillCast(__Me,"Target_Restoration")
ACTIONS
	IF "!c1"
		IsInCombat(__Me)
	THEN	
		Output("Success")
	ELSE
		Output("Failed")
	ENDIF

Now if my logic is on point, I should get "success" because I'm NOT in combat, when I cast restoration. I don't expect ELSE to run of course, but never know.

Well, here's the thing, I've yet got this script to work, with any character, at least for the Game Mode of the Editor. I have not tried it in the actual game.

If anyone can tell me what I'm doing wrong here, it'd be appreciated.

Joined: May 2017
enthusiast
Offline
enthusiast
Joined: May 2017
I've not been able to get any of the log commands to work, so one thing I would try is putting your message into a DisplayText or a StatusText. Also, make sure you have both of your scripts added to a Package in the Resource Manager.

If that still doesn't work, then you need to make sure Base.charScript is really being overriden. KVN has a useful post here on how to properly override base game scripts.

Joined: Sep 2017
Location: Finland
Rasikko Offline OP
journeyman
OP Offline
journeyman
Joined: Sep 2017
Location: Finland
Thanks laugh. Yes changing Output to either of the ones you mentioned worked. Now I can move forward.

I got output working by turning on Debug.

Last edited by Rasikko; 28/09/17 05:34 PM.
Joined: May 2017
enthusiast
Offline
enthusiast
Joined: May 2017
Originally Posted by Rasikko
I got output working by turning on Debug.

Doh! I forgot that was a thing in the script editor. Thanks. Being able to get feedback from code is super helpful.


Moderated by  Larian_KVN 

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