GetEventData
Description
GetEventData Is a special condition function used to test the data in an event sent to the Story Manager. Its primary use is to conditionalize nodes and quests in the story manager, as well as conditionalize aliases in quests. The event data persists even after the quest initializes, so it can also be used to conditionalize dialogue and packages owned by the quest.
There are three parameters.
- Event Function
- This is a drop down that lets you pick a function to test the data against
- GetIsID
- GetValue
- HasKeyword
- IsInList
- This is a drop down that lets you pick a function to test the data against
- Event Member
- This is the Event Member we are running the Event Function on (some combinations of Function and Member are irrelevant, for example GetValue makes sense testing a numeric event data, but GetIsID does not. Whereas a GetIsID makes sense when testing an Actor or Reference data member)
- Data(Optional)
- For some Event Functions, an additional parameter is needed. For example, if you are using GetInList Actor1 the third parameter is where you supply the FormList
Notes
For many types of data and function combinations, you do not need to use this special function. You can use the RUN ON drop down list to select the event data to run the function on, and then the normal function. For example, you can Select RUN ON Actor1 in a Dialogue Activate event, and then select GetIsID from the normal condition function picker.
This is equivalent to picking the GetEventData function and choosing the GetIsID as the Event Function parameter, the Actor1 as the Event Member.
However, the GetEventData condition function is the only way to get at certain kinds of data from an event. For example, if you want to test if a Kill Actor Event generated a crime warning, you need to use GetEventData GetValue, CrimeStatus == 2
Another example is Player AddItem event. Because it does not pass the item as a reference (because it doesn't exist as a reference in the player's inventory), it instead passes that data in as an "ObjectForm" event member, which means you can't run normal condition functions on it (because it's a "form" object not a reference object.) So, for example, if you want to know if the object added is a sword, you would have to test GetEventData HasKeyword, ObjectForm, WeapTypeSword.