Larian Banner
Previous Thread
Next Thread
Print Thread
Joined: Sep 2018
S
Squawsh Offline OP
stranger
OP Offline
stranger
S
Joined: Sep 2018
Hello.

So I'm working on gameScripts for some abilities I'm creating and I've come across ITEM parameters for some of the ON "trigger functions" (or w/e they're called) that are unclear to me.

I'm unsure what the ITEM:source parameter seen in the call OnTurnEnded() or the ITEM:defenderItem/ITEM:attackerItem parameters seen in OnCharacterStartAttackObject() are used for. Why would there need to be an ITEM in the parameter for OnTurnEnded() when all it does is "throw when the character's turn ended?"

Example:

EVENT MyModsTurnEffect

VARS

CHARACTER:_Caster
CHARACTER:_Target
ITEM: _Dummy

ON

[i]OnTurnEnded(_Target, _Dummy)[/i]

ACTIONS

...


Could anyone here enlighten me as to what these ITEM parameters are used for? Thanks!

Joined: Mar 2016
Location: Belgium
T
addict
Offline
addict
T
Joined: Mar 2016
Location: Belgium
It's because items can also participate in combat, and because behaviour script has no generic "object" type. As a result, if a character's turn ends in a combat, the the character parameter will be filled in and the item parameter will be null, and the other way around.


Moderated by  Larian_Koala 

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