IAdvancedRobotPeer GetEventPriority Method Robocode Robot API for .NET
Returns the current priority of a class of events. An event priority is a value from 0 - 99. The higher value, the higher priority.

Examples

int myHitRobotPriority = GetEventPriority("HitRobotEvent");

The default priorities are, from highest to lowest:
<see cref="T:Robocode.BattleEndedEvent" />:     100 (reserved)
              <see cref="T:Robocode.WinEvent" />:             100 (reserved)
              <see cref="T:Robocode.SkippedTurnEvent" />:     100 (reserved)
              <see cref="T:Robocode.StatusEvent" />:           99
              Key and mouse events:  98
              <see cref="T:Robocode.CustomEvent" />:           80 (default value)
              <see cref="T:Robocode.MessageEvent" />:          75
              <see cref="T:Robocode.RobotDeathEvent" />:       70
              <see cref="T:Robocode.BulletMissedEvent" />:     60
              <see cref="T:Robocode.BulletHitBulletEvent" />:  55
              <see cref="T:Robocode.BulletHitEvent" />:        50
              <see cref="T:Robocode.HitByBulletEvent" />:      40
              <see cref="T:Robocode.HitWallEvent" />:          30
              <see cref="T:Robocode.HitRobotEvent" />:         20
              <see cref="T:Robocode.ScannedRobotEvent" />:     10
              <see cref="T:Robocode.PaintEvent" />:             5
              <see cref="T:Robocode.DeathEvent" />:            -1 (reserved)

Namespace: Robocode.RobotInterfaces.Peer
Assembly: robocode (in robocode.dll) Version: 1.9.2.0
Syntax

int GetEventPriority(
	string eventClass
)

Parameters

eventClass
Type: OnlineSystem String
The name of the event class (string)

Return Value

Type: OnlineInt32
See Also