Difference between revisions of "Event"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(more splitting)
m (Updating links)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Events are a package of information that can be passed around in the game to trigger some behaviour.  They are usually passed off to an [[object]]'s [[event script]] for handling, but there are a few engine-only event types that are not exposed to the end-users.
+
:''This article is about the event constructor function. For information about how events work in general, see [[Event keyword]]''
  
Scripting Events have an integer type, target object, a time delay and a package of parameters (arbitrary number of [[int]]s, [[object]]s, [[float]]s and [[string]]s).  Certain event types will be defined by the engine and referenced as #defines in the scripts.
+
{{dafunction
 +
|name=Event
 +
|brief=Creates an event of the specified type.
 +
|param1type=int
 +
|param1name=nEventType
 +
|param1desc=The type of event to create
 +
|returntype=event
 +
|returndesc=Returns an event of the specified type, returns an invalid event on error.
 +
|sourcefile=script.ldf
 +
|sourcemodule=
 +
}}
  
Events are handled in the scripting language with the following types of commands:
+
== Description ==
* Event() Constructor —  Scripters can create events of any type and signal them to other objects
+
<!-- This section contains the full description from the functions comments. Do not change unless you are confident these are incomplete or incorrect. -->
* Signal Event commands —  Events can be signalled to a single object, by proximity or to all objects with a certain group id
+
Creates an event of the specified type.
* Parameter access —  All of the parameters on an event can be get and set through scripting.
+
* Event handling —  Events can be passed to other script files through the HandleEvent command.  This command will be run inline so that hierarchies of event-handling behaviour can be built.
+
  
A typical event-handling script would have the form
+
<!-- == Remarks == -->
 +
<!-- This section contains additional comments, observations and known issues. -->
  
<dascript>
+
<!-- == Examples == -->
void main()
+
<!-- This section contains examples transcluded from the snippet library. -->
{
+
    event ev = GetCurrentEvent();
+
    int nEventType = GetEventType(ev); //extract event type from current event
+
    int nEventHandled = FALSE; //keep track of whether the event has been handled
+
    switch(nEventType)
+
    {
+
        case EVENT_TYPE_AREALOAD_SPECIAL:
+
        {
+
            ...
+
            nEventHandled = TRUE; //set this if no further action is required for this event
+
            break;
+
        }
+
    }
+
    if (!nEventHandled) //If this event wasn't handled by this script, let the core script try
+
    {
+
        HandleEvent(ev, RESOURCE_SCRIPT_AREA_CORE);
+
    }
+
}
+
</dascript>
+
  
In the event that you want to intercept some events but leave others to be handled by a default script (for example if you're overriding one aspect of a creature's event response but the rest of the default creature_core responses responses are fine) you can pass execution to the default script with the following:
+
== See also ==
 +
<!-- This section contains links to articles, functions or constant groups. -->
 +
[[Event keyword]]
  
<dascript>
+
[[Category: Event functions]]
    HandleEvent(ev, RESOURCE_SCRIPT_CREATURE_CORE);
+
</dascript>
+
 
+
(constants for referencing core script resources are available in the "global_objects_h" include file)
+
 
+
Below is a list of the event types that are defined within the core resources:
+
 
+
* '''Perception'''
+
** [[EVENT_TYPE_PERCEPTION_APPEAR]] - A creature enters the perception area of creature receiving the event
+
** [[EVENT_TYPE_PERCEPTION_DISAPPEAR]] - A creature exits the perception area of creature receiving the event
+
* '''Effects'''
+
**[[EVENT_TYPE_APPLY_EFFECT]] - an effect is applied to the receiving object
+
**[[EVENT_TYPE_REMOVE_EFFECT]] - an effect is removed from the receiving object
+
* '''Combat'''
+
**[[ EVENT_TYPE_COMBAT_INITIATED ]] - Fires whenever the attack command is added into the command queue. Used to set combat mode and combat camera/music. Also fires by scripting to trigger combat after being attacked or an ally is attack.
+
**[[ EVENT_TYPE_COMBAT_END ]] - a creature doesn't perceive any more hostiles.
+
**[[ EVENT_TYPE_MELEE_ATTACK_START ]] - {{undocumented}}
+
**[[ EVENT_TYPE_COMMAND_PENDING ]] - Fires at the beginning of the attack part of the attack command OR at the beginning of an ability execution.
+
**[[ EVENT_TYPE_COMMAND_COMPLETE ]] - creature finishes doing a command(attack, special ability, spell, conversation, etc)
+
**[[ EVENT_TYPE_ATTACK_IMPACT ]] -- An attack has impacted the target. This can be melee (sword hit), ranged (arrow hit) or spell (fireball explodes). Used for applying damage, and handling abilities that function on hit (Berserk etc').
+
**[[ EVENT_TYPE_ATTACKED ]] - another object tried attacking this creature using melee/ranged weapons (hit or miss), talents or spells.
+
**[[ EVENT_TYPE_ALLY_ATTACKED ]] - an ally has received the ATTACKED event. An ally is an object with the same group ID.
+
* '''Damage and death'''
+
**[[ EVENT_TYPE_DAMAGED ]] - an object loses 1 hit point or more
+
**[[ EVENT_TYPE_DOT_TICK ]] - Damage over time tick event.
+
**[[ EVENT_TYPE_DYING ]] - a creature received the killing blow.
+
**[[ EVENT_TYPE_DEATH ]] - creature or placeable have the death effect applied (regardless of hitpoints)
+
**[[ EVENT_TYPE_RESURRECTION ]] - Creature resurrected.
+
**[[ EVENT_TYPE_TEAM_DESTROYED ]] - Fires when an entire team of creatures is destroyed.
+
* '''Inventory '''
+
**[[ EVENT_TYPE_INVENTORY_ADDED ]] - An item is added to the personal inventory of the object receiving the event or the party inventory.
+
**[[ EVENT_TYPE_INVENTORY_REMOVED ]] - An item is removed from the personal inventory of the object receiving the event or the party inventory.
+
**[[ EVENT_TYPE_EQUIP ]] - The current creature has equipped an item
+
**[[ EVENT_TYPE_UNEQUIP ]] - The current creature has unequipped an item
+
**[[ EVENT_TYPE_CAMPAIGN_ITEM_ACQUIRED ]] - items with the ITEM_ACQUIRED_EVENT_ID variable set are picked up.
+
**[[ EVENT_TYPE_INVENTORY_FULL ]] - {{undocumented}}
+
**[[ EVENT_TYPE_OUT_OF_AMMO ]] - {{undocumented}}
+
* '''Movement'''
+
**[[ EVENT_TYPE_BLOCKED ]] - The current creature's path has been blocked while moving by a creature or door. This event will NOT fire when blocked by placeables who can not change the walk mesh or terrain.
+
**[[ EVENT_TYPE_ENTER ]] - A creature enters the object receiving the event
+
**[[ EVENT_TYPE_EXIT ]] - A creature exits the object receiving the event
+
**[[ EVENT_TYPE_REACHED_WAYPOINT ]] - {{undocumented}}
+
* '''Traps'''
+
**[[ EVENT_TYPE_APPROACH_TRAP ]] - Trap triggered and the creature receiving this event should approach the trap
+
**[[ EVENT_TYPE_TRAP_ARM ]] Sent by script to request that a trap arm itself.
+
**[[ EVENT_TYPE_TRAP_TRIGGER_ENTER ]] - {{undocumented}}
+
**[[ EVENT_TYPE_TRAP_DISARMED ]] - {{undocumented}}
+
**[[ EVENT_TYPE_TRAP_TRIGGER_ARMED ]] - {{undocumented}}
+
**[[ EVENT_TYPE_TRAP_TRIGGER_EXIT ]] - {{undocumented}}
+
**[[ EVENT_TYPE_TRAP_TRIGGERED ]] - {{undocumented}}
+
* '''Game state events'''
+
**[[ EVENT_TYPE_SPAWN ]] - an object spawns into the game. This event can fire only once per game for each object, regardless of save games.
+
**[[ EVENT_TYPE_MODULE_START ]] - The module starts. This can happen only once for a single game instance.
+
**[[ EVENT_TYPE_MODULE_LOAD ]] - The module loads from a save game. This event can fire more than once for a single module or game instance.
+
**[[ EVENT_TYPE_AREALOAD_SPECIAL ]]- for playing things like cutscenes and movies when you enter an area, things that do not involve AI or actual game play
+
**[[ EVENT_TYPE_AREALOAD_PRELOADEXIT ]] - for things you want to happen while the load screen is still up, things like moving creatures around
+
**[[ EVENT_TYPE_AREALOAD_POSTLOADEXIT ]] - fires at the same time that the load screen is going away, and can be used for things that you want to make sure the player sees.
+
**[[ EVENT_TYPE_AREALOADSAVE_POSTLOADEXIT ]] - fires at the same time that the load screen is going away, but only when loading a savegame.
+
**[[ EVENT_TYPE_GAMEMODE_CHANGE ]]
+
**[[ EVENT_TYPE_DELAYED_GM_CHANGE ]]
+
**[[ EVENT_TYPE_SET_GAME_MODE ]]
+
*'''Plots'''
+
**[[ EVENT_TYPE_SET_PLOT ]] - A plot is setting a plot flag
+
**[[ EVENT_TYPE_GET_PLOT ]] - A plot is setting a plot flag
+
*''' Dialogue'''
+
**[[ EVENT_TYPE_DIALOGUE ]] - An object tries to initiate dialog with the object receiving the event, either by clicking or by scripting
+
**[[ EVENT_TYPE_DELAYED_SHOUT ]] - Used to fire a dialog shout every few seconds.
+
**[[ EVENT_TYPE_AMBIENT_CONTINUE ]] - conversation ends or player is nearby to resume ambient behaviour
+
*'''Party management'''
+
**[[ EVENT_TYPE_PARTYMEMBER_ADDED ]] - Party member added to active party using the party GUI
+
**[[ EVENT_TYPE_PARTYMEMBER_DROPPED ]] - Party member removed from active party using the party GUI
+
**[[ EVENT_TYPE_PARTYPICKER_CLOSED ]] - {{undocumented}}
+
**[[ EVENT_TYPE_PARTY_MEMBER_HIRED ]] - Fires first time a party member is added to the party. For plot followers: follower recruited (added to pool). For other followers: UT_Hire called
+
**[[ EVENT_TYPE_PARTY_MEMBER_FIRED ]] - Fires when an active or locked-active party member is removed from the active party
+
**[[ EVENT_TYPE_PARTY_MEMBER_RES_TIMER ]] - Resurrection timer used if a creature dies in explore mode.
+
**[[ EVENT_TYPE_GIFT_ITEM ]]- {{undocumented}}
+
**[[ EVENT_TYPE_MODULE_HANDLE_FOLLOWER_DEATH ]] - {{undocumented}}
+
**[[ EVENT_TYPE_MODULE_HANDLE_GIFT ]] - {{undocumented}}
+
**[[ EVENT_TYPE_SUMMON_DIED ]] - {{undocumented}}
+
* '''Character generation and level advancement '''
+
**[[EVENT_TYPE_CHARGEN_START]] and [[EVENT_TYPE_CHARGEN_END ]] - A range of event constants (nEvent >= EVENT_TYPE_CHARGEN_START && nEvent <= EVENT_TYPE_CHARGEN_END) that occur during character generation.
+
**[[ EVENT_TYPE_PLAYER_LEVELUP ]] Fired by sys_rewards_h.RewardXP (the levelup system)
+
**[[ EVENT_TYPE_PLAYERLEVELUP ]]
+
**[[ EVENT_TYPE_CHARGEN_AUTOLEVEL ]]
+
**[[ EVENT_TYPE_MODULE_CHARGEN_DONE ]]
+
**[[ EVENT_TYPE_GUI_OPENED ]] - GUI tutorial calls
+
* '''World map'''
+
**[[ EVENT_TYPE_TRANSITION_TO_WORLD_MAP ]] - Player uses the generic transition system to open the world map
+
**[[ EVENT_TYPE_WORLD_MAP_CLOSED ]]
+
**[[ EVENT_TYPE_WORLD_MAP_USED ]] - the player clicks on a destination in the world map
+
** [[ EVENT_TYPE_BEGIN_TRAVEL ]]
+
** [[ EVENT_TYPE_WORLDMAP_PRETRANSITION ]]
+
**[[ EVENT_TYPE_WORLDMAP_POSTTRANSITION ]]
+
**[[ EVENT_TYPE_FINISH_TRAVEL ]]
+
*''' Found in placeable_core '''
+
**[[ EVENT_TYPE_PLACEABLE_ONCLICK ]] player clicks on object.
+
**[[ EVENT_TYPE_USE ]]
+
**[[ EVENT_TYPE_UNLOCKED ]] Sent by script when placeable is unlocked.
+
**[[ EVENT_TYPE_SET_OBJECT_ACTIVE ]] Sent by script to change active state. Needed since CommandDoFunction was removed and we're using CommandDoEvent
+
**[[ EVENT_TYPE_PLACEABLE_COLLISION ]] player collides with object (if EnableCollisionEvent column in placeables.xls is non-zero).
+
**[[ EVENT_TYPE_POPUP_RESULT ]]
+
 
+
== Found in rules_core ==
+
 
+
[[ EVENT_TYPE_ITEM_ONHIT ]]
+
 
+
*<b>Sent When:</b>
+
*<b>Sent From:</b>
+
*<b>Sent To:</b>
+
 
+
Parameters:
+
 
+
[[ EVENT_TYPE_CONFUSION_CALLBACK ]]
+
 
+
*<b>Sent When:</b>
+
*<b>Sent From:</b>
+
*<b>Sent To:</b>
+
 
+
Parameters:
+
 
+
 
+
 
+
 
+
[[ EVENT_TYPE_DESTROY_OBJECT ]]
+
 
+
*<b>Sent When:</b> Object should be destroyed
+
*<b>Sent From:</b>
+
*<b>Sent To:</b>
+
 
+
Parameters:
+
 
+
== Found in player_core ==
+
 
+
[[ EVENT_TYPE_HEARTBEAT ]]
+
 
+
*<b>Sent When:</b>
+
*<b>Sent From:</b>
+
*<b>Sent To:</b>
+
 
+
Parameters:
+
 
+
 
+
[[ EVENT_TYPE_LOAD_TACTICS_PRESET ]]
+
 
+
*<b>Sent When:</b>
+
*<b>Sent From:</b>
+
*<b>Sent To:</b>
+
 
+
Parameters:
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
== Spellcasting ==
+
 
+
[[ EVENT_TYPE_ABILITY_CAST_START ]]
+
 
+
- Update mana/stamina
+
- Calculate *combat* attack/miss (only for hit based talents like Deadly Strike)
+
- Calculate resistance check/failure for non-AOE abilities (if valid)
+
- Calculate *combat* damage (only for hit based talents like Deadly Strike)
+
Most of the above information is then passed on to the engine who need to decide what animations to play (or not to play). The engine then returns most of this information along with the CAST_IMPACT event back to this script (see below)
+
 
+
*<b>Sent When: whenever any ability (spell, talent) is used</b>
+
*<b>Sent From: engine</b>
+
*<b>Sent To:</b>
+
 
+
Parameters:
+
*Object 1 - the item used to cast the ability (optional)
+
*Object 2 - the object that the ability was targeted
+
 
+
note: in case of a projectile impact, there might be more than one target (object 2+...) this allows doing things like lightning bolts going through targets, but this is not currently made use of in Dragon Age.
+
 
+
[[ EVENT_TYPE_ABILITY_CAST_IMPACT ]]
+
 
+
*<b>Sent When:</b> Fires for the moment of impact for every ability. This is where damage should be applied, fireballs explode, enemies get poisoned etc. We assume that stamina/mana have been deducted when the ability was triggered (COMMAND_PENDING stage)
+
*<b>Sent From: engine</b>
+
*<b>Sent To:</b>
+
 
+
Parameters:
+
 
+
*Object 1 - the item used to cast the ability (optional)
+
*Object 2 - the object that the ability was targeted
+
 
+
note: in case of a projectile impact, there might be more than one target (object 2+...) this allows doing things like lightning bolts going through targets, but this is not currently made use of in Dragon Age.
+
 
+
[[ EVENT_TYPE_CAST_AT ]]
+
 
+
*<b>Sent When:</b> placeable is hit by a spell.
+
*<b>Sent From:</b> engine
+
*<b>Sent To:</b> placeable
+
 
+
Parameters:
+
 
+
[[ EVENT_TYPE_COMBO_IGNITE ]]
+
 
+
*<b>Sent When:</b>
+
*<b>Sent From:</b>
+
*<b>Sent To:</b> module
+
 
+
Parameters:
+
 
+
 
+
 
+
[[ EVENT_TYPE_SPELLCASTAT ]]
+
 
+
*<b>Sent When:</b>
+
*<b>Sent From:</b>
+
*<b>Sent To:</b>
+
 
+
Parameters:
+
[[ EVENT_TYPE_SPELLSCRIPT_CAST ]]
+
 
+
*<b>Sent When:</b>
+
*<b>Sent From:</b>
+
*<b>Sent To:</b>
+
 
+
Parameters:
+
[[ EVENT_TYPE_SPELLSCRIPT_DEACTIVATE ]]
+
 
+
*<b>Sent When:</b> Talent deactivated
+
*<b>Sent From:</b>
+
*<b>Sent To:</b>
+
 
+
Parameters:
+
 
+
[[ EVENT_TYPE_SPELLSCRIPT_IMPACT ]]
+
 
+
*<b>Sent When:</b>
+
*<b>Sent From:</b>
+
*<b>Sent To:</b>
+
 
+
Parameters:
+
[[ EVENT_TYPE_SPELLSCRIPT_PENDING ]]
+
 
+
*<b>Sent When:</b>
+
*<b>Sent From:</b>
+
*<b>Sent To:</b>
+
 
+
Parameters:
+
 
+
 
+
 
+
== Proving events ==
+
 
+
[[ EVENT_TYPE_PROVING_ENTER ]]
+
 
+
*<b>Sent When:</b>
+
*<b>Sent From:</b>
+
*<b>Sent To:</b>
+
 
+
Parameters:
+
[[ EVENT_TYPE_PROVING_EXIT ]]
+
 
+
*<b>Sent When:</b>
+
*<b>Sent From:</b>
+
*<b>Sent To:</b>
+
 
+
Parameters:
+
[[ EVENT_TYPE_PROVING_LOSE ]]
+
 
+
*<b>Sent When:</b>
+
*<b>Sent From:</b>
+
*<b>Sent To:</b>
+
 
+
Parameters:
+
[[ EVENT_TYPE_PROVING_START ]]
+
 
+
*<b>Sent When:</b>
+
*<b>Sent From:</b>
+
*<b>Sent To:</b>
+
 
+
Parameters:
+
[[ EVENT_TYPE_PROVING_WIN ]]
+
 
+
*<b>Sent When:</b>
+
*<b>Sent From:</b>
+
*<b>Sent To:</b>
+
 
+
Parameters:
+
 
+
 
+
 
+
 
+
== Debugging ==
+
 
+
[[ EVENT_TYPE_DEBUG_KICKSTART_AI ]]
+
 
+
*<b>Sent When:</b> Kickstart the AI if it was frozen out. Debug Event, do not use in production scripts
+
*<b>Sent From:</b>
+
*<b>Sent To:</b>
+
 
+
Parameters:
+
 
+
[[ EVENT_TYPE_DEATH_RES_PARTY ]]
+
 
+
Party Resurrection button (cheat, death UI)
+
 
+
*<b>Sent When:</b>
+
*<b>Sent From:</b>
+
*<b>Sent To: module</b>
+
 
+
Parameters:
+
 
+
 
+
[[ EVENT_TYPE_DEBUG_RESURRECTION ]]
+
 
+
This makes the resurrection button work.
+
 
+
*<b>Sent When:</b>
+
*<b>Sent From:</b>
+
*<b>Sent To: module</b>
+
 
+
Parameters:
+
 
+
 
+
== Stats ==
+
 
+
[[ EVENT_TYPE_STAT_REGEN ]]
+
 
+
*<b>Sent When:</b> Stat regeneration. might be changed in the future.
+
*<b>Sent From:</b>
+
*<b>Sent To:</b>
+
 
+
Parameters:
+
 
+
[[ EVENT_TYPE_MANA_STAM_DEPLETED ]]
+
 
+
*<b>Sent When:</b> Creature ran out of mana or stamina
+
*<b>Sent From:</b>
+
*<b>Sent To:</b>
+
 
+
Parameters:
+
 
+
 
+
== Miscellaney ==
+
 
+
[[ EVENT_TYPE_CLICK ]]
+
 
+
*<b>Sent When:</b>
+
*<b>Sent From:</b>
+
*<b>Sent To:</b>
+
 
+
Parameters:
+
 
+
[[ EVENT_TYPE_CUSTOM_COMMAND_COMPLETE ]]
+
 
+
Also EVENT_TYPE_CUSTOM_EVENT_01 to EVENT_TYPE_CUSTOM_EVENT_08
+
 
+
*<b>Sent When:</b>
+
*<b>Sent From:</b>
+
*<b>Sent To:</b>
+
 
+
Parameters:
+
 
+
[[ EVENT_TYPE_FAILTOOPEN ]]
+
 
+
*<b>Sent When:</b>
+
*<b>Sent From:</b>
+
*<b>Sent To:</b>
+
 
+
Parameters:
+
 
+
[[ EVENT_TYPE_HANDLE_CUSTOM_AI ]]
+
 
+
Handle any custom AI before handling the built-in AI.
+
 
+
This event is sent to creature scripts after custom AI has been enabled (call CAI_SetCustomAI(OBJECT_SELF, CAI_INITIATE) in the EVENT_TYPE_SPAWN event).
+
 
+
*<b>Sent When:</b>
+
*<b>Sent From:</b>
+
*<b>Sent To:</b>
+
 
+
Parameters:
+
 
+
[[ EVENT_TYPE_INVALID ]]
+
 
+
*<b>Sent When:</b>
+
*<b>Sent From:</b>
+
*<b>Sent To:</b>
+
 
+
Parameters:
+
 
+
[[ EVENT_TYPE_LISTENER ]]
+
 
+
 
+
*<b>Sent When:</b>
+
*<b>Sent From:</b>
+
*<b>Sent To:</b>
+
 
+
Parameters:
+
[[ EVENT_TYPE_LOCKED ]]
+
 
+
*<b>Sent When:</b>
+
*<b>Sent From:</b>
+
*<b>Sent To:</b>
+
 
+
Parameters:
+
 
+
[[ EVENT_TYPE_QA_EVENT ]]
+
 
+
*<b>Sent When:</b>
+
*<b>Sent From:</b>
+
*<b>Sent To:</b>
+
 
+
Parameters:
+
[[ EVENT_TYPE_QA_EVENT_BLA ]]
+
 
+
*<b>Sent When:</b>
+
*<b>Sent From:</b>
+
*<b>Sent To:</b>
+
 
+
Parameters:
+
 
+
[[ EVENT_TYPE_STEALING_FAILURE ]]
+
 
+
*<b>Sent When:</b>
+
*<b>Sent From:</b>
+
*<b>Sent To:</b>
+
 
+
Parameters:
+
[[ EVENT_TYPE_STEALING_SUCCESS ]]
+
 
+
*<b>Sent When:</b>
+
*<b>Sent From:</b>
+
*<b>Sent To:</b>
+
 
+
Parameters:
+
 
+
[[ EVENT_TYPE_UNIQUE_POWER ]]
+
 
+
*<b>Sent When: a unique power for an item is used</b>
+
*<b>Sent From:</b>
+
*<b>Sent To:</b>
+
 
+
Parameters:
+
 
+
*Ability = Integer 0
+
*Item    = Object 0
+
*Caster  = Object 1
+
*Target  = Object 2
+
 
+
 
+
== Shouts ==
+
 
+
Shouts (events) are used to make creatures communicate with one another. This is a list of all the shouts referenced in the AI documentation.
+
 
+
[[ Creature Shouts ]]
+
 
+
*SHOUT_TYPE_WASATTACKED When I am attacked, signal this event for all allies. What do the allies do? They will go into combat round, not specifically targeting this attacker but becoming combat ready.
+
*SHOUT_TYPE_SAWENEMY Attack enemy.
+
*SHOUT_TYPE_KILLEDME Attack enemy.
+
*SHOUT_TYPE_SWITCH_MELEE Will switch to melee weapons, useful for certain plot situations
+
*SHOUT_TYPE_WAKE_UP Any creature that hears this shout will wake up, if sleeping. This shout needs to be manually called.
+
*SHOUT_TYPE_FOUND_SOMEONE (YaronToDo) a scout sees someone they broadcasts this event. Allies go here. (NOT DONE)
+
 
+
[[ Commander-Specific Orders ]]
+
 
+
*SHOUT_TYPE_FINISHHIM Attacks a specified enemy till they are dead. A Commander issues order generally.
+
*SHOUT_TYPE_ATTACK_WIZARD (YaronToDo) Starting targeting wizard class enemies instead of others.
+
*SHOUT_TYPE_FLANK Rogues will get into a flanking position to an appropriate enemy
+
*SHOUT_TYPE_SWITCH_RANGED Will randomly choose one ally and ask them to switch to a ranged weapon. This is mostly done to even out the number of participants in melee battle for animation purposes (closer to even the sides are, the better things look)
+
 
+
 
+
[[Category:Scripts]]
+

Latest revision as of 00:05, 3 August 2011

This article is about the event constructor function. For information about how events work in general, see Event keyword

Creates an event of the specified type.

event Event(
int nEventType
);
Parameters:
nEventType
The type of event to create
Returns:

Returns an event of the specified type, returns an invalid event on error.

Source:

script.ldf

Description

Creates an event of the specified type.


See also

Event keyword