Entities default to run speed = 0
Notification event This was SVN commit r3340.
This commit is contained in:
parent
ee0227092a
commit
8f7202f00b
@ -19,5 +19,6 @@
|
||||
<Script File="entities/template_entity_script.js" />
|
||||
<Event On="Generic" Function="entityEventGeneric" />
|
||||
<Event On="TargetChanged" Function="entityEventTargetChanged" />
|
||||
<Event On="Notification" Function="entityEventNotification" />
|
||||
|
||||
</Entity>
|
@ -512,7 +512,23 @@ function entityEventGeneric( evt )
|
||||
console.write( "Unknown generic action: " + evt.action );
|
||||
}
|
||||
}
|
||||
|
||||
function entityEventNotification( evt )
|
||||
{
|
||||
switch( evt.type )
|
||||
{
|
||||
case NOTIFY_GOTO:
|
||||
this.Order( ORDER_GENERIC, evt.location.x, evt.location.y );
|
||||
case NOTIFY_ATTACK:
|
||||
case NOTIFY_DAMAGE:
|
||||
this.Order( ORDER_GENERIC, evt.target, ACTION_ATTACK);
|
||||
this.Order( ORDER_GENERIC, evt.target, ACTION_ATTACK);
|
||||
case NOTIFY_HEAL:
|
||||
this.Order( ORDER_GENERIC, evt.target, ACTION_HEAL);
|
||||
case NOTIFY_GATHER:
|
||||
this.Order( ORDER_GENERIC, evt.target, ACTION_GATHER);
|
||||
|
||||
}
|
||||
}
|
||||
// ====================================================================
|
||||
|
||||
function entityEventTargetChanged( evt )
|
||||
|
Loading…
Reference in New Issue
Block a user