Script question -1 reply

Please wait...

Biggus Dickus VIP Member

I would die without my life.

195,640 XP

19th January 2004

0 Uploads

18,764 Posts

0 Threads

#1 14 years ago

Hi folks

There is something I really can't understand about the "+button4" command. For the ones who doesn't know it, "+button4" can execute a Cvar when a key is pressed and "-button4" can execute an other command when this key is released.

In fact, I try to use it to get rid of this damn "wait" command in the Volley script. The concept is simple :

mouse1 pressed=>fire ; mouse1 released=>switch

For example: bind mouse1 "+button4 ; vstr vol_shot ; -button4" set vol_shot "vstr vol_tog1" set vol_tog1 "+attack ; -attack ; -attack ; set vol_shot vstr vol_tog2" set vol_tog2 "weaponbank 3 ; set vol_shot vstr vol_tog1"

And it works fine. The problem is that I want this script working only for the Volley rifle and I want a toggle to turn it on/off. So I have to set as Cvar the binded mouse1 to execute it only when I want to. Something like this:

set mouse_bind "bind mouse1 vstr vol_bind" set vol_bind "+button4 ; vstr vol_shot ; -button4" set vol_shot "vstr vol_tog1" set vol_tog1 "+attack ; -attack ; -attack ; set vol_shot vstr vol_tog2" set vol_tog2 "weaponbank 3 ; set vol_shot vstr vol_tog1"

And that's where the problem is. Instead of : mouse1 pressed=>fire ; mouse1 released=>switch this does: mouse1 pressed=>fire ; mouse1 released=>nothing ; mouse1 pressed=>switch ; mouse1 released=>nothing

Anyone has an idea to fix this?

I could set the first code in a separate file.cfg and toggle an execution in a main script (I did and it worked) but I really can't understand why "vol_tog2" is not executed when mouse1 is released. Can't "+button4" and "-button4" be integrated in a Cvar? It's really weird.




DEADEYE

Wild west mod of RTCW

50 XP

23rd April 2003

0 Uploads

3,213 Posts

0 Threads

#2 14 years ago

no iam not sure but i have a hunch dragon:bows: may help us both ,, can the long jump script be used in WW . mouse 3 ....2 toggle on ......c to turn off those huge long jumps >?:confused: Deadeye:deal:




Biggus Dickus VIP Member

I would die without my life.

195,640 XP

19th January 2004

0 Uploads

18,764 Posts

0 Threads

#3 14 years ago

I see what you mean. I know how to execute 1, 2 or more commands with the same key. But I have to press the key several times to execute the different commands and this is not what I want. I want :

PRESS => ACTION RELEASE => OTHER ACTION And all this in the same Cvar!

Thank you anyway!




El Dragon

Wild West Mod

50 XP

25th June 2003

0 Uploads

2,523 Posts

0 Threads

#4 14 years ago

didn't know about the mouse4 thingy will do some research and some testing. Maybe I'll drag in some others for testing too. I love tinkering :D




Biggus Dickus VIP Member

I would die without my life.

195,640 XP

19th January 2004

0 Uploads

18,764 Posts

0 Threads

#5 14 years ago

Arg. Dragon, you was my last hope for this problem! OK, I will set up different cfg files since it works like this. Keep an eye on the volley's thread! ;)