EventHelper
Source function static unit.clearRegister()
Source
function static trigger.getSource() returns unit
Source
function static trigger.getSourceRect() returns rect
Source
function static eventid.isKeyboardEvent() returns boolean
Source
function static eventid.isMouseEvent() returns boolean
Source
function static eventid.isPlayerunitEvent() returns boolean
Source
function static region.loadRegionData() returns int
Source
function static trigger.registerRectEnterEventSource(rect r)
Source
function static trigger.registerRectLeaveEventSource(rect r)
Source
function static trigger.registerUnitInRangeSource(unit whichUnit, real range, boolexpr filter) returns event
Source
function static trigger.registerUnitInRangeSource(unit whichUnit, real range) returns event
Source
function static region.removeRegionData()
Source
function static region.setRegionData(int data)
Source
function static trigger.unregisterRectEvent()
Source
class EventData
Source
This class exposes all Getters and Setters for trigger events.
Note: As these functions simply wrap natives, they will only return proper values during event callbacks (actions/conditions).
To use these values in a subsequent closure, save the event data in a variable at the time the event was fired.
function getAbilityTargetPos() returns vec2
Source
function getAbsorbingItem() returns item
Source
function getAttackerUnit() returns unit
Source
function getBuyingUnit() returns unit
Source
function getCancelledStructure() returns unit
Source
Returns the building which was being constructed but as cancelled.
function getChangingUnit() returns unit
Source
function getChangingUnitPreviousOwnerPlayer() returns player
Source
function getChatMessage() returns string
Source
function getChatMessageMatched() returns string
Source
function getClickedDialog() returns dialog
Source
Source
function getConstructedStructure() returns unit
Source
Returns the building which is being constructed.
function getConstructingStructure() returns unit
Source
Returns the unit which constructs the structure.
function getDamageAttackType() returns attacktype
Source
function getDamageTarget() returns unit
Source
function getDamageType() returns damagetype
Source
function getDamageWeaponType() returns weapontype
Source
function getDecayingUnit() returns unit
Source
function getDetectedUnit() returns unit
Source
function getDetectingPlayer() returns player
Source
function getDyingUnit() returns unit
Source
function getEnteringUnit() returns unit
Source
function getEventDamage() returns real
Source
Return damage done by Unit to another target unit.
function getEventDamageSource() returns unit
Source
function getEventId() returns eventid
Source
Get trigger event.
function getEventTargetUnit() returns unit
Source
function getExpiredTimer() returns timer
Source
function getGameState() returns gamestate
Source
function getIsKeyDown() returns boolean
Source
function getIssuedOrderId() returns int
Source
function getKillingUnit() returns unit
Source
function getLearnedSkill() returns int
Source
function getLearnedSkillLevel() returns int
Source
function getLearningUnit() returns unit
Source
function getLeavingUnit() returns unit
Source
function getLevelingUnit() returns unit
Source
function getLoadedUnit() returns unit
Source
Get unit thas is loaded to transport.
function getManipulatedItem() returns item
Source
function getManipulatingUnit() returns unit
Source
EVENT_PLAYER_UNIT_DROP_ITEM
EVENT_PLAYER_UNIT_PICKUP_ITEM
EVENT_PLAYER_UNIT_USE_ITEM
EVENT_UNIT_DROP_ITEM
EVENT_UNIT_PICKUP_ITEM
EVENT_UNIT_USE_ITEM
function getMouseWorldPos() returns vec2
Source
Returns player's mouse position on screen. Do not confuse with getMouseLocationVec2.
function getOrderPos() returns vec2
Source
function getOrderTargetDestructable() returns destructable
Source
function getOrderTargetItem() returns item
Source
function getOrderTargetPos() returns vec2
Source
function getOrderTargetUnit() returns unit
Source
Source
function getOrderX() returns real
Source
function getOrderY() returns real
Source
function getOrderedUnit() returns unit
Source
function getPlayerMouseX() returns real
Source
Return player's mouse X position on the terrain. Alternative: getMouseScreenVec2.
function getPlayerMouseY() returns real
Source
Return player's mouse Y position on the terrain. Alternative: getMouseScreenVec2.
function getPlayerState() returns playerstate
Source
function getRescuerUnit() returns unit
Source
function getResearchedType() returns int
Source
function getResearchingUnit() returns unit
Source
function getRevivableUnit() returns unit
Source
function getRevivingUnit() returns unit
Source
function getSaveFilename() returns string
Source
function getSellingUnit() returns unit
Source
function getSoldItem() returns item
Source
function getSoldUnit() returns unit
Source
function getSpellAbility() returns ability
Source
function getSpellAbilityId() returns int
Source
function getSpellAbilityUnit() returns unit
Source
function getSpellTargetDestructable() returns destructable
Source
function getSpellTargetItem() returns item
Source
function getSpellTargetPos() returns vec2
Source
function getSpellTargetUnit() returns unit
Source
function getSpellTargetX() returns real
Source
function getSpellTargetY() returns real
Source
function getStackingItemSource() returns item
Source
EVENT_PLAYER_UNIT_STACK_ITEM
Source is the item that is losing charges, Target is the item getting charges.
function getStackingItemTarget() returns item
Source
EVENT_PLAYER_UNIT_STACK_ITEM
Source is the item that is losing charges, Target is the item getting charges.
function getStackingItemTargetPreviousCharges() returns int
Source
function getSummonedUnit() returns unit
Source
function getSummoningUnit() returns unit
Source
function getSyncData() returns string
Source
function getSyncPrefix() returns string
Source
function getTournamentFinishPlayer() returns player
Source
function getTrainedUnit() returns unit
Source
function getTrainedUnitType() returns int
Source
function getTransportUnit() returns unit
Source
Get unit that is transporting.
function getTriggerDestructable() returns destructable
Source
function getTriggerFrame() returns framehandle
Source
function getTriggerFrameEvent() returns frameeventtype
Source
function getTriggerKey() returns oskeytype
Source
Source
function getTriggerPlayer() returns player
Source
function getTriggerRegion() returns region
Source
function getTriggerUnit() returns unit
Source
Source
function getWinningPlayer() returns player
Source
function isAttackDamage() returns boolean
Source
Returns `true` if the damage done is done with Unit's attack.
function isKeyboardEvent() returns boolean
Source
Check if current trigger event is Keyboard Event.
function isManipulatedItemAbsorbed() returns boolean
Source
function isMouseEvent() returns boolean
Source
Check if current trigger event is Mouse Event.
function isPlayerunitEvent() returns boolean
Source
Check if current trigger event is Playerunit Event.
function setDamage(real damage)
Source
Change damage from damage event.
function setDamageAttackType(attacktype attackType)
Source
Change damage from damage event.
function setDamageType(damagetype damageType)
Source
Change damage from damage event.
function setDamageWeaponType(weapontype weaponType)
Source
Change damage from damage event.