___ASYSTOLE___ Posted April 6, 2002 Share Posted April 6, 2002 I have 'adapted' a script provided by Essobie (thank you) for cycling between 3 force powers (drain, light, grip). Here's the pertinent code which is in a .cfg file I have bound to a function key: //COMMON FORCE CYCLER - LIGHTNING --> DRAIN --> GRIP bind MOUSE5 "vstr forcecycle" set forcecycle "vstr lightning" set lightning "echo ^1LIGHTNING; bind MOUSE4 +force_lightning; set forcecycle vstr drain" set drain "echo ^1DRAIN; bind MOUSE4 +force_drain; set forcecycle vstr grip" set grip "echo ^1GRIP; bind MOUSE4 +force_grip; set forcecycle vstr lightning" So, pressing MOUSE5 cycles through the powers and binds them to MOUSE4. The problem I run into is that when I play multiplayer with bots, the force power will activate constantly without me pressing MOUSE4. So, basically I run around firing brief bursts of the power every several seconds, unintentionally. Now my code differs from Essobie's code somewhat. Is there something in my script that is causing it? Here is Essobie's code: bind o "vstr cycleactionforce1" // SEE SCRIPTS.CFG bind p "vstr cycleactionforce2" // SEE SCRIPTS.CFG set cycleactionforce1 "vstr actionforce_grip1" set actionforce_lightning1 "echo ^1LIGHTNING ^4DRAIN ^4GRIP; bind shift +force_lightning; set cycleactionforce1 vstr actionforce_drain1" set actionforce_drain1 "echo ^4LIGHTNING ^1DRAIN ^4GRIP; bind shift +force_drain; set cycleactionforce1 vstr actionforce_grip1" set actionforce_grip1 "echo ^4LIGHTNING ^4DRAIN ^1GRIP; bind shift +force_grip; set cycleactionforce1 vstr actionforce_lightning1" set cycleactionforce2 "vstr actionforce_lightning2" set actionforce_lightning2 "echo ^1LIGHTNING ^4DRAIN ^4GRIP; bind shift +force_lightning; set cycleactionforce2 vstr actionforce_drain2" set actionforce_drain2 "echo ^4LIGHTNING ^1DRAIN ^4GRIP; bind shift +force_drain; set cycleactionforce2 vstr actionforce_grip2" set actionforce_grip2 "echo ^4LIGHTNING ^4DRAIN ^1GRIP; bind shift +force_grip; set cycleactionforce2 vstr actionforce_lightning2" Thanks, and again credit to Essobie whom the script was addapted from. ASYSTOLE Link to comment Share on other sites More sharing options...
RedHerring Posted April 6, 2002 Share Posted April 6, 2002 Bump When I get the game I want to bind the neutral powers and light/dark powers to different keys. Edit: I'm PMed you. Link to comment Share on other sites More sharing options...
Millions o' Monkeys Posted April 7, 2002 Share Posted April 7, 2002 sorry i cant pick out what could be wrong Link to comment Share on other sites More sharing options...
Essobie Posted April 7, 2002 Share Posted April 7, 2002 The only thing that I see fishy in your code is that you are using Mouse buttons that I didn't even know you could bind... is that one of the MS Intellipoint opticals with extra buttons on the side? What I did was alter the keys used to i and o (instead of the mouse settings). Try it yourself to see if it works. If it does... then it's something goofy with how your Mouse4 and Mouse5 work on your mouse. Also note: there is no +force_drain command in SP... but all it did on this script for me was echo "Unknown command +force_drain" over and over when I tried to activate it while it was set to +force_drain. Good luck. bind i "vstr forcecycle" set forcecycle "vstr lightning" set lightning "echo ^1LIGHTNING; bind o +force_lightning; set forcecycle vstr drain" set drain "echo ^1DRAIN; bind o +force_drain; set forcecycle vstr grip" set grip "echo ^1GRIP; bind o +force_grip; set forcecycle vstr lightning" Essobie Link to comment Share on other sites More sharing options...
___ASYSTOLE___ Posted April 7, 2002 Author Share Posted April 7, 2002 I changed the code a bit, and it seems to be working fine. Yes, it's a MS Intellipoint Explorer Mouse. Here's the code now: //COMMON FORCE1 CYCLER - LIGHTNING --> DRAIN --> GRIP set forcecycle1 "vstr grip1" set lightning1 "echo ^1LIGHTNING ^4DRAIN ^4GRIP; bind MOUSE4 +force_lightning; set forcecycle1 vstr drain1" set drain1 "echo ^4LIGHTNING ^1DRAIN ^4GRIP; bind MOUSE4 +force_drain; set forcecycle1 vstr grip1" set grip1 "echo ^4LIGHTNING ^4DRAIN ^1GRIP; bind MOUSE4 +force_grip; set forcecycle1 vstr lightning1" //COMMON FORCE2 CYCLER - SEEING --> SPEED --> THROW set forcecycle2 "vstr seeing2" set seeing2 "echo ^1SEEING ^4SPEED ^4THROW; bind MOUSE5 force_seeing; set forcecycle2 vstr speed2" set speed2 "echo ^4SEEING ^1SPEED ^4THROW; bind MOUSE5 force_speed; set forcecycle2 vstr throw2" set throw2 "echo ^4SEEING ^4SPEED ^1THROW; bind MOUSE5 force_throw; set forcecycle2 vstr seeing2" bind MWHEELDOWN "vstr forcecycle1" bind MWHEELUP "vstr forcecycle2" ASYSTOLE Link to comment Share on other sites More sharing options...
RedHerring Posted April 7, 2002 Share Posted April 7, 2002 is this correct? //LIGHT/DARK FORCE1 CYCLER - Absorb --> Heal --> Mind Trick --> Protection // LIGHTNING --> DRAIN --> GRIP --> RAGE set forcecycle1 "vstr absorb1" set absorb1 "echo ^1ABSORB ^4HEAL ^4DISTRACT ^4PROTECT; bind G +force_absorb; set forcecycle1 vstr heal1" set heal1 "echo ^4ABSORB ^1HEAL ^4DISTRACT ^4PROTECT; bind G +force_heal; set forcecycle1 vstr distract1" set distract1 "echo ^4ABSORB ^4HEAL ^1DISTRACT ^4PROTECT; bind G +force_distract; set forcecycle1 vstr protect1" set protect1 "echo ^4ABSORB ^4HEAL ^4DISTRACT ^1PROTECT; bind G +force_protect; set forcecycle1 vstr lightning1" //DARK SIDE set lightning1 "echo ^1LIGHTNING ^4DRAIN ^4GRIP ^4RAGE; bind G +force_lightning; set forcecycle1 vstr drain1" set drain1 "echo ^4LIGHTNING ^1DRAIN ^4GRIP ^4RAGE; bind G +force_drain; set forcecycle1 vstr grip1" set grip1 "echo ^4LIGHTNING ^4DRAIN ^1GRIP ^4RAGE; bind G +force_grip; set forcecycle1 vstr rage1" set rage1 "echo ^4LIGHTNING ^4DRAIN ^4GRIP ^1RAGE; bind G +force_rage; set forcecycle1 vstr absorb1" //=============== //=============== //Neutral FORCE2 CYCLER - SEEING --> SPEED --> PUSH --> PULL set forcecycle2 "vstr seeing2" set seeing2 "echo ^1SEEING ^4SPEED ^4PUSH ^4PULL; bind F force_seeing; set forcecycle2 vstr speed2" set speed2 "echo ^4SEEING ^1SPEED ^4PUSH ^4PULL; bind F force_speed; set forcecycle2 vstr push2" set push2 "echo ^4SEEING ^4SPEED ^1PUSH ^4PULL; bind F force_push; set forcecycle2 vstr pull2" set pull2 "echo ^4SEEING ^4SPEED ^4PUSH ^1PULL; bind F force_pull; set forcecycle2 vstr seeing2" bind MWHEELDOWN "vstr forcecycle1" bind R "vstr forcecycle2" Link to comment Share on other sites More sharing options...
Essobie Posted April 7, 2002 Share Posted April 7, 2002 Originally posted by RedHerring //Neutral FORCE2 CYCLER - SEEING --> SPEED --> PUSH --> PULL set forcecycle2 "vstr seeing2" set seeing2 "echo ^1SEEING ^4SPEED ^4PUSH ^4PULL; bind F force_seeing; set forcecycle2 vstr speed2" set speed2 "echo ^4SEEING ^1SPEED ^4PUSH ^4PULL; bind F force_speed; set forcecycle2 vstr push2" set push2 "echo ^4SEEING ^4SPEED ^1PUSH ^4PULL; bind F force_push; set forcecycle2 vstr pull2" set pull2 "echo ^4SEEING ^4SPEED ^4PUSH ^1PULL; bind F force_pull; set forcecycle2 vstr seeing2" bind MWHEELDOWN "vstr forcecycle1" bind R "vstr forcecycle2" This part here can be improved since you aren't dealing with +action commands like Lightning, Grip, and Drain. All of these can be done by simply parsing a command to the console. What can be improved is that since they are just parsed "one time only" commands like "force_seeing" then you can break the bind command OUT of the script allowing you to quickly change that bind if you desire in the future (also making it much easier to read). Try this: set forcecycle2 "vstr seeing2" set seeing2 "echo ^1SEEING ^4SPEED ^4PUSH ^4PULL; set neutralpower force_seeing; set forcecycle2 vstr speed2" set speed2 "echo ^4SEEING ^1SPEED ^4PUSH ^4PULL; set neutralpower force_speed; set forcecycle2 vstr push2" set push2 "echo ^4SEEING ^4SPEED ^1PUSH ^4PULL; set neutralpower force_push; set forcecycle2 vstr pull2" set pull2 "echo ^4SEEING ^4SPEED ^4PUSH ^1PULL; set neutralpower force_pull; set forcecycle2 vstr seeing2" bind MWHEELDOWN "vstr forcecycle1" bind R "vstr forcecycle2" bind f "vstr neutralpower" // End The ONLY reason I made the script like I did for the +actions is that if you try the same trick with those, you'll find that you can't hold down the assigned key/button, and if you just tap it, the power sticks in the "on" position. Not pretty. Essobie Link to comment Share on other sites More sharing options...
RedHerring Posted April 7, 2002 Share Posted April 7, 2002 This part here can be improved since you aren't dealing with +action commands like Lightning, Grip, and Drain. All of these can be done by simply parsing a command to the console. What can be improved is that since they are just parsed "one time only" commands like "force_seeing" then you can break the bind command OUT of the script allowing you to quickly change that bind if you desire in the future (also making it much easier to read). I think i see what you mean. +action commands are used for hit and hold button powers, while "one time only" are just like jump or seeing? So it will be easier so I can bind a force power to a key later and not have it screw up. The ONLY reason I made the script like I did for the +actions is that if you try the same trick with those, you'll find that you can't hold down the assigned key/button, and if you just tap it, the power sticks in the "on" position. Not pretty. Essobie No, it isn't pretty. Anyways, I'll just paste your code into mine which I hope will work. Seeing as how I don't even have JKO yet (hoping it arrives on Tuesday) I have the time. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.