Cog Files


Weapon Reference

Weapon related verbs.

ActivateWeapon
AssignWeapon
AutoSelectWeapon
ChangeFireRate
DeactivateWeapon
FireProjectile
GetCurInvWeapon
GetCurWeapon
GetCurWeaponMode
GetWeaponPriority
SelectWeapon
SetCurInvWeapon
SetCurWeapon
SetFireWait

ActivateWeapon() Control

Activates a weapon.

Use: ActivateWeapon(player,flex firerate,mode); mode is retrieved with GetSenderRef(); ,in the activated: message handler of the weapon cog.


AssignWeapon() Control

Gives a weapon to player . Bins Ref

Use: AssignWeapon(player,bin);


AutoSelectWeapon()

Selects a weapon automatically. Used in JK when ammo runs out.

Use: AutoSelectWeapon(player,weaponint); Weaponint: 1=bryer, 2=ST rifle, etc etc...


ChangeFireRate() Control

Changes the fire rate of weapon.

Use: ChangeFireRate(player,flex rate);


DeactivateWeapon() Control

Deactivates a weapon.

Use: DeactivateWeapon(player,mode); mode is retrieved with GetSenderRef();


FireProjectile() Control

Fires a projectile.

Use: FireProjectile(1,2,3,4,5,6,7,8,9,10);

  1. = thing ( thing shooting )
  2. = projectile template ( shot )
  3. = fire sound ( firing sound )
  4. = mode int (is the mode to play when firing (same values as PlayMode()))
  5. = fireoffset vector
  6. = aiming error vector
  7. = unknown flex
  8. = flags unknown int
  9. = auto aiming field of view flex
  10. = auto aiming field of view max dist flex

GetCurInvWeapon()

?

? Not Used in JK


GetCurWeapon()

Gets the current weapon held by the player.

Use: (GetCurWeapon(player); Worked best with If statement: If(GetCurWeapon(player) == weapon_int)


GetCurWeaponMode()

Used for weapons that charge, such as the TD and Crossbow

Use: GetCurWeaponMode; Used most often in If Statement: If(GetCurWeaponMode() != 1)


GetWeaponPriority()

Determines if the weapon picked up has a better priority than the one currently in hand, found in the POW &Weapon cogs.

Use: GetWeaponPriority(player,int_weapon-index,int_select-mode);


Control SelectWeapon()

Selects a weapon . Bins Ref

Use: SelectWeapon(thing,bin);


SetCurInvWeapon() Control

Sets the current inventory weapon.

Use: SetCurInvWeapon(player,0);


SetCurWeapon() Control

Sets the current weapon. Bins Ref

Use: SetCurWeapon(player,bin);


SetFireWait() Control

Delays use of weapon

Use: SetFirewait(player,flex delay);