Explain event trigger data?

Lutefisk Mafia

Inscrutable Enforcer
Joined
Jun 15, 2007
Messages
544
Location
Minnesota
I have looked in the forums, and found good threads about designing events, but haven't found one that gives a good explaination of the event trigger data.

For example, one FfH2 event has lines that ready like this:

Code:
	iEvent = CvUtil.findInfoTypeNum(gc.getEventTriggerInfo, gc.getNumEventTriggerInfos(),'EVENTTRIGGER_HYBOREMS_WHISPER')
	triggerData = pPlayer.initTriggeredData(iEvent, true, -1, caster.getX(), caster.getY(), iPlayer, -1, -1, -1, -1, -1)

It is the stuff in parentheses that I am curious about. Sometimes that block will be just a series of "-1"s with a single zero in there, too.

I am guessing that these entries help pass information to the event itself to be used later in an applicable python executable?

What do each of these placeholders do? What can be assigned to them, and how do they work exactly? I have been trying to program some events, and it would be really nice if I could designate the unit that triggered the event and use it in the python resulting action.

Any help or pointers would be truly appreciated!

Thanks!
 
The function's signature is

Code:
EventTriggeredData 
CyPlayer.initTriggeredData
(
    EventTriggerTypes eEventTrigger, 
    bool bFire, 
    int iCityId, 
    int iPlotX, 
    int iPlotY, 
    PlayerTypes eOtherPlayer, 
    int iOtherPlayerCityId, 
    ReligionTypes eReligion, 
    CorporationTypes eCorporation, 
    int iUnitId, 
    BuildingTypes eBuilding
)

The BTS Python API is a great source of information on functions. This function is listed there.
 
Emperor Fool, you have saved me a tremendous amount of time and frustration. Thank you!
 
@EmperorFool

The link you've provided is to your filesystem. Could you change it to an online one (http)?
 
Top Bottom