Difference between revisions of "TOnWeaponChangeEvent"

From Soldat Community Wiki
Jump to: navigation, search
(Created page with "==Description== Type used by TActivePlayer.OnWeaponChange as an event handler type. ==Declaration== {{expand|primary/secondary is a before or after change state}} proced...")
 
(Declaration)
 
Line 3: Line 3:
  
 
==Declaration==
 
==Declaration==
{{expand|primary/secondary is a before or after change state}}
+
 
 
  procedure(Player: [[TActivePlayer]]; Primary, Secondary: [[TPlayerWeapon]])
 
  procedure(Player: [[TActivePlayer]]; Primary, Secondary: [[TPlayerWeapon]])
 
   Player: player changing weapons
 
   Player: player changing weapons
   Primary:  
+
   Primary: Player's Primary weapon after the change
   Secondary:
+
   Secondary: Player's Secondary weapon after the change
 +
 
 +
{{note|During execution of code in the event, Player argument still contains information about weapons '''before''' the weapons change.  This means ''Player.Primary.Name'' is '''not''' equal to ''Primary.Name''.}}
  
 
[[Category:Types]]
 
[[Category:Types]]

Latest revision as of 07:54, 5 October 2014

Description

Type used by TActivePlayer.OnWeaponChange as an event handler type.

Declaration

procedure(Player: TActivePlayer; Primary, Secondary: TPlayerWeapon)
 Player: player changing weapons
 Primary: Player's Primary weapon after the change
 Secondary: Player's Secondary weapon after the change
Note: During execution of code in the event, Player argument still contains information about weapons before the weapons change. This means Player.Primary.Name is not equal to Primary.Name.