#415 Need to expose "attack_type" in spawn_npcs table to spawn set commands/lua

Closed
opened 2 years ago by neatz09 · 2 comments
neatz09 commented 2 years ago
There is no content yet.
image commented 1 year ago
Collaborator

adding these to the info struct:

int32           range_last_attack_time
int32           primary_last_attack_time
int32           secondary_last_attack_time
int16           primary_attack_delay
int16           secondary_attack_delay
int16           ranged_attack_delay
int8            primary_weapon_type
int8            secondary_weapon_type
int8            ranged_weapon_type
int32           primary_weapon_damage_low
int32           primary_weapon_damage_high
int32           secondary_weapon_damage_low
int32           secondary_weapon_damage_high
int32           ranged_weapon_damage_low
int32           ranged_weapon_damage_high
int8            wield_type
int8            attack_type
int16           primary_weapon_delay
int16           secondary_weapon_delay
int16           ranged_weapon_delay

int8            override_primary_weapon
int8            override_secondary_weapon
int8            override_ranged_weapon
adding these to the info struct: int32 range_last_attack_time int32 primary_last_attack_time int32 secondary_last_attack_time int16 primary_attack_delay int16 secondary_attack_delay int16 ranged_attack_delay int8 primary_weapon_type int8 secondary_weapon_type int8 ranged_weapon_type int32 primary_weapon_damage_low int32 primary_weapon_damage_high int32 secondary_weapon_damage_low int32 secondary_weapon_damage_high int32 ranged_weapon_damage_low int32 ranged_weapon_damage_high int8 wield_type int8 attack_type int16 primary_weapon_delay int16 secondary_weapon_delay int16 ranged_weapon_delay int8 override_primary_weapon int8 override_secondary_weapon int8 override_ranged_weapon
image commented 1 year ago
Collaborator

Example of overriding the primary weapon and setting low dmg to 10 high dmg to 20 with a 1 second delay:

  SetInfoStructUInt(NPC, "override_primary_weapon", 1)
  SetInfoStructUInt(NPC, "primary_weapon_delay", 1000)
  SetInfoStructUInt(NPC, "primary_weapon_damage_low", 10)
  SetInfoStructUInt(NPC, "primary_weapon_damage_high", 20)
  SetInfoStructUInt(NPC, "primary_weapon_type", 1)
  SetInfoStructUInt(NPC, "wield_type", 1)
Example of overriding the primary weapon and setting low dmg to 10 high dmg to 20 with a 1 second delay: SetInfoStructUInt(NPC, "override_primary_weapon", 1) SetInfoStructUInt(NPC, "primary_weapon_delay", 1000) SetInfoStructUInt(NPC, "primary_weapon_damage_low", 10) SetInfoStructUInt(NPC, "primary_weapon_damage_high", 20) SetInfoStructUInt(NPC, "primary_weapon_type", 1) SetInfoStructUInt(NPC, "wield_type", 1)
Sign in to join this conversation.
Loading...
Cancel
Save
There is no content yet.