As andre states, Duel.GetChainInfo returns information provided by the current chain, depending on the parameters you give it. First parameter is always the chain link, so for your example, it would always get the info for chain link 1, the first card/effect to be activated in the chain and the last to be resolved (just to clarify. Surely you know, how the chains work 🙂 )
Your second parameter is CHAININFO_TRIGGERING_EFFECT, which is exactly what it says, the effect, that triggers the chain link. This is the effect of the card, that is activated as the chain link 1. An effect is an object used in scripting cards for YGOPro. Do note, that this is a whole different monster compared to AI scripting. You might have had a look at the scripts of the YGOPro cards before, here you will find effects everywhere. Every card usually has multiples of these, and most functions get effects passed to them as their first parameter (usually just called "e").
If you are not familiar with card scripting, you might get overwhelmed here, as card scripting is a different entity compared to ai scripting. You'll have to handle different types, use different functions in a different way etc ect. Have a look at
Fluo's GitHub for possible functions to interact with the effect type.
Do note, that effect is a "userdata" type, not a table like the ones you're used to from AI scripting. You cannot access the fields of an effect, you'll have to use the appropriate get/set funtions to interact with them:
local e = Duel.GetChainInfo(1,CHAININFO_TRIGGERING_EFFECT)
local c = e:GetHandler()
-- "Handler" is the card handling the effect. Do note, that this is a card script object. Not the same as a card object you would get from an AI script function. Confusing, I know.
local id = c:GetCode() -- the ID of the card
local target = e:GetTarget()
-- and this is how you could get some useful information of an effect like that maybe
What exactly do you want to achieve?
Edited by user
2017-09-08T21:14:26Z
|
Reason: Not specified