Knife and pistol script

Topics regarding Scripting with Reality Factory
Post Reply
User avatar
zany_001
Posts: 1047
Joined: Fri Mar 02, 2007 8:36 am
Location: Aotearoa

Knife and pistol script

Post by zany_001 »

Hey, i dont know rf scripting yet, but could you have a script that letas you hold a knife and a pistol at the same time, and use right mouse button to fire one and left mouse for other?perhaps:

Code: Select all

{
          if activeWeapon==pistol  
         and pickedUpWeapon==knife
         then keepPistolActive
         else if activeWeapon==knife
         and pickedUpWeapon==pistol
         then keepKnifeActive
         }
and i could dig up some old code to make the weapon firing work independantly
(soz for bad coding :oops: :oops: )
Once I was sad, and I stopped being sad and was awesome instead.
True story.
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post by darksmaster923 »

i remeber juutis had a script for that
the command for what weapon is if(self.player_weapon)
the number is the entry in the ini file
Herp derp.
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

Yep, there's a script like that in my demo. But all the scripts lack comments... so it may be a bit tricky to understand.
I have, however, started to comment them and I will post all the scripts once I get them all done.
Pain is only psychological.
User avatar
zany_001
Posts: 1047
Joined: Fri Mar 02, 2007 8:36 am
Location: Aotearoa

Post by zany_001 »

Sweet im learning the scripting language now
Once I was sad, and I stopped being sad and was awesome instead.
True story.
Post Reply