Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.

New to the forum? Say hello in this topic! Also make sure to read the rules.

Add RifleWeaponItem.EquipLazer && HandgunWeaponItem.EquipLazer

Here you can find ScriptAPI suggestions implemented in the game.
Forum rules
By using the forum you agree to the following rules.
Locked
NearHuscarl
Superfighter
Superfighter
Posts: 97
Joined: Thu Feb 07, 2019 4:36 am

Add RifleWeaponItem.EquipLazer && HandgunWeaponItem.EquipLazer

Post by NearHuscarl » Thu Mar 26, 2020 7:20 pm

I am writing a method to get all of the weapons in the inventory of an IPlayer and transfer it to another IPlayer. Right now there is no way to know if the player's guns are equipped with laser or not.
2 x
Image

User avatar
Gurt
Lead Programmer
Lead Programmer
Posts: 1884
Joined: Sun Feb 28, 2016 3:22 pm
Title: Lead programmer
Started SFD: Made it!
Location: Sweden
Gender:
Age: 34

Post by Gurt » Sun Apr 26, 2020 12:58 pm

Added after v.1.3.5:
ScriptAPI: Added IPlayer.CurrentPrimaryRangedWeapon and IPlayer.CurrentSecondaryRangedWeapon which both returns the same struct RangedWeaponItem which is the same representation as RifleWeaponItem and HandgunWeaponItem (they all three have the same properties).
ScriptAPI: Added LazerEquipped property to RangedWeaponItem, RifleWeaponItem and HandgrunWeaponItem to be able to read if a ranged weapon has a lazer upgrade attached.
1 x
Gurt

Locked