• Variable from weapon to entity
    4 replies, posted
Is there any way in lua to acces weapon's variable by entity? For example I have a variable "isFiring" and I want entity to know is specified player firing or not. How can I acces "isFiring" by entity?
WeaponEntity.isFiring
So can I do something like: [code] self.Entity:GetOwner():GetWeapon().isFiring [/code] ??
[QUOTE=JakusPL;50843446]So can I do something like: [code] self.Entity:GetOwner():GetWeapon().isFiring [/code] ??[/QUOTE] Yes. Also, you can just use self, and it's GetActiveWeapon().
Ok, thank you
Sorry, you need to Log In to post a reply to this thread.