• TTT: SecondaryAttack first
    3 replies, posted
I am scripting a Traitoritem for TTT. Before the Traitor can use SWEP:PrimaryAttack and kill someone, he has to prepare the weapon first by using SWEP:SecondaryAttack. How can I disable PrimaryAttack until the Traitor has used SecondaryAttack ?
use Boolean values [url]http://lua-users.org/wiki/LuaTypesTutorial[/url]
[QUOTE=thejjokerr;52520204]To clarify: In the primary attack method you will check to see if a boolean value is set to true. e.g: self.CanAttackNow In the secondary attack method. You will set that value to the boolean value true. e.g: self.CanAttackNow = true. You will have to take into account that this value needs to be reset when primary attacking. Take your logic step by step. Perhaps write it down. Lookup the terms discussed in this thread and try to learn from it. You will learn some important methods in programming that will help you (no doubt) later on when tackling new ideas.[/QUOTE] Thanks for the Advice. I´ll do as you say.
Sorry, you need to Log In to post a reply to this thread.