katanamaru Posted January 26, 2010 Share Posted January 26, 2010 I'm not sure about this, but you may be able to use a 'vstr' command to do that. It is possible to bind to views to different keys though. Check this out: http://jediknight3.filefront.com/file/First_Person_Lightsaber_Mod;27567#Rate This lets you bind 2 views to 2 keys. You could try making a 'vstr' command to switch between the two as practice. Link to comment Share on other sites More sharing options...
acdcfanbill Posted January 27, 2010 Share Posted January 27, 2010 here's a toggle for pmove_fixed that I have in my config. You should be able to look at it and adapt it to your command. edit: after looking at this script, it occurs to me I must have been drunk when writing it the first time as I added in an extra layer of vstr's I didn't need. So this codeblock has my new hastily rewritten and very quickly bug checked version. The old one is in the hidden block if you care to look. ///////////////////////////////////////////////////////////// // PMOVE SCRIPT ///////////////////////////////////////////////////////////// set pmovetrue "pmove_fixed 1; echo ^7pmove_fixed is ^5TRUE; set pmovetoggle vstr pmovefalse set pmovefalse "pmove_fixed 0; echo ^7pmove_fixed is ^1FALSE; set pmovetoggle vstr pmovetrue set pmovetoggle vstr pmovetrue; bind INS "vstr pmovetoggle" Show spoiler (hidden content - requires Javascript to show) ///////////////////////////////////////////////////////////// // PMOVE SCRIPT ///////////////////////////////////////////////////////////// set pmovetrue "pmove_fixed 1; vstr pmovenumber; set pmovetoggle vstr pmovefalse" set pmovefalse "pmove_fixed 0; vstr pmovenumber; set pmovetoggle vstr pmovetrue" set pmove_0 "pmove_fixed 0; set pmovenumber vstr pmove_1; echo ^7pmove_fixed is ^1FALSE" set pmove_1 "pmove_fixed 1; set pmovenumber vstr pmove_0; echo ^7pmove_fixed is ^5TRUE" set pmovenumber vstr pmove_0 set pmovetoggle vstr pmovetrue bind INS "vstr pmovetoggle" ///////////////////////////////////////////////////////////// // END PMOVE SCRIPT ///////////////////////////////////////////////////////////// It need not be just a toggle either, you can have it cycle through values too. Take my timenudge script... ///////////////////////////////////////////////////////////// // TIMENUDGE SCRIPT ///////////////////////////////////////////////////////////// set startcycle "cl_timenudge 0; cg_smoothclients 1; vstr cyclenumber; set cycletoggle" set timenudge_0 "cl_timenudge 0; cg_smoothclients 1; set cyclenumber vstr timenudge_25;wait 10; echo ^7TIMENUDGE IS ^3[0]" set timenudge_25 "cl_timenudge -25; cg_smoothclients 0; set cyclenumber vstr timenudge_40;wait 10; echo ^7TIMENUDGE IS ^3[-25]" set timenudge_40 "cl_timenudge -40; cg_smoothclients 0; set cyclenumber vstr timenudge_50;wait 10; echo ^7TIMENUDGE IS ^3[-40]" set timenudge_50 "cl_timenudge -50; cg_smoothclients 0; set cyclenumber vstr timenudge_60;wait 10; echo ^7TIMENUDGE IS ^3[-50]" set timenudge_60 "cl_timenudge -60; cg_smoothclients 0; set cyclenumber vstr timenudge_75;wait 10; echo ^7TIMENUDGE IS ^3[-60]" set timenudge_75 "cl_timenudge -75; cg_smoothclients 0; set cyclenumber vstr timenudge_100;wait 10; echo ^7TIMENUDGE IS ^3[-75]" set timenudge_100 "cl_timenudge -100; cg_smoothclients 0; set cyclenumber vstr timenudge_0;wait 10; echo ^7TIMENUDGE IS ^3[-100]" set cyclenumber vstr timenudge_0 set cycletoggle vstr startcycle bind HOME "vstr cycletoggle" ///////////////////////////////////////////////////////////// // END TIMENUDGE SCRIPT ///////////////////////////////////////////////////////////// These of course have echo's to spit out info to the user, you may or may not want those Link to comment Share on other sites More sharing options...
Dark Jedi Han Posted January 28, 2010 Author Share Posted January 28, 2010 Hmmm, I'm slightly getting into it, but still don't understand it completely. Don't forget I'm new to the business lol . I think I understood how the vstr command works, but I don't really know the "pmove" command or what it stands for. IF I want a camera toggle, then do I have to replace all the pmove lines with "set cg_thirdperson 1; cg_thirdpersonRange 40, cg_thirdpersonVertOffset 5; ... " and then bind them to a key (eg INS) that toggles them ? Of course, if that's the case, then I'll bind them to Mouse 2 EDIT: And thanks for the help Link to comment Share on other sites More sharing options...
acdcfanbill Posted January 29, 2010 Share Posted January 29, 2010 Yea, pmove_fixed is a cvar that controls some physics calculations, but for your case, you want to toggle 3 cvars. You use the Set command to set some actions to a name so you're would look something like this... set camera_on "cg_thirdperson 1; cg_thirdpersonRange 40; cg_thirdpersonvertoffset 5; echo ^7fancy camera is ^5ON; set cameratoggle vstr camera_off" set camera_off "cg_thirdperson 0; cg_thirdpersonRange 80; cg_thirdpersonvertoffset 16; echo ^7fancy camera is ^5OFF; set cameratoggle vstr camera_on set cameratoggle vstr camera_on" bind mouse2 "vstr cameratoggle" I tested this quick and it worked fine for me, you need cheats on to tweak the 3rd person commands in MP. I don't recall for SP. Link to comment Share on other sites More sharing options...
Dark Jedi Han Posted January 29, 2010 Author Share Posted January 29, 2010 Same for SP . Thanks, it helped much EDIT: This is quite getting on my nerves... I've been tapping all buttons on my keyboard to open the console in Dragon O.9.2 and I know that it is `, but it just won't open. And I don't know what that ASCII code 0126 or something is. Any suggestions ? Link to comment Share on other sites More sharing options...
Dark Jedi Han Posted February 17, 2010 Author Share Posted February 17, 2010 I've searched through the internet but couldn't find it. I have an azerty keyboard, so ` doesn't work in dragon tool to open the console. Does anyone know how I could change the binds or how to open the console ? Otherwise I can't make animations EDIT: I just had an idea for the vstr command. It does work in SP after you've enabled cheats (that's the way I've tried it out). But for the Primary and Secondary fire: If I made an vstr command to toggle between them, like "set mouse1 primaryfire; echo .... (Don't really know what has to come after that)" "set mouse1 secondaryfire; echo ..." "set firetoggle vstr firetoggle_on" "bind x "vstr firetoggle" with x an unbound key. Would that work? And I'm gonna need some serious correction for the commands ... Link to comment Share on other sites More sharing options...
acdcfanbill Posted February 17, 2010 Share Posted February 17, 2010 The echo is just to output stuff to the console to tell you what happened if you want to, it's not needed. As for your script, you are setting variable mouse1 to two different things, and then settings the variable firetoggle to the variable string named firetoggle_on which you didn't set anywhere. Here's what I think you want to do, you want to set mouse button 1 (mouse1) to do primary fire (+attack) at some points and secondary fire (+altattack) at others 1) so you need two variable strings, primfire which will set mouse1 to primary fire, and secfire which will set mouse1 to secondary fire set primfire "bind mouse1 +attack;" set secfire "bind mouse1 +altattack;" 2) now you need to somehow toggle between them, so we need a third variable string, we'll call it togglefire and to start off with, we'll just set it to do primary fire (primfire) first. But because primfire is a variable string, we need to put vstr in front of it when we bind the new variable string (togglefire) to the primary fire variable string (primfire) set primfire "bind mouse1 +attack;" set secfire "bind mouse1 +altattack;" set togglefire "vstr primfire;" 3) But if you look at that, you'll see it doesn't really toggle, because nothing ever sets the toggle to anything else, so what we have to do is make the act of setting the primary fire change the toggle variable string so that it will set mouse1 to the secondary fire the next time we use it. To do that, we need to edit the primfire and secfire variable strings to have them set the appropriate things, namely, primary fire (primfire) sets the toggle to make mouse1 do secondary fire (secfire) and secondary fire sets the toggle to make mouse1 do primary fire (primfire). Not forgetting of course, that primfire and secfire are both variable strings so vstr is needed. set primfire "set togglefire vstr secfire; bind mouse1 +attack;" set secfire "set togglefire vstr primfire; bind mouse1 +altattack;" set togglefire "vstr primfire;" 4) and then of course, we need a button that actually does the toggling, so we use X to represent that. setting the key to the variable string togglefire nets the final result... set primfire "set togglefire vstr secfire; bind mouse1 +attack;" set secfire "set togglefire vstr primfire; bind mouse1 +altattack;" set togglefire "vstr primfire;" bind x "vstr togglefire;" now, you have to be careful with this because +attack and +altattack arn't just regular commands, they are on as long as the button is pressed, so if you are holding mouse1 during secondary fire (+altattack) to say, charge a bryar shot, and you hit the X key to try switching, you'll have secondary fire stuck on and have to put a -altattack into the console to fix it. Link to comment Share on other sites More sharing options...
Dark Jedi Han Posted February 17, 2010 Author Share Posted February 17, 2010 {o.o} I understood quite much of it, except step 3). It's blocking my mind and I am losing concentration because it's complicated. I'm sure I'll understand it later though. I can see vstr commands are your speciality, you're really good at it. Thanks again ! *Turns to katanamaru and awaits his answer for the other question* Link to comment Share on other sites More sharing options...
acdcfanbill Posted February 18, 2010 Share Posted February 18, 2010 perhaps if I explained it in a different way. imagine this is the first state mouse1 is bound to +attack X is bound to "bind mouse1 +altattack" this means, pressing x will change mouse1 to be +altattack, so then we would have mouse1 is bound to +altattack X is bound to "bind mouse1 +altattack" Now we are stuck on +altattack because X is still "bind mouse1 +altattack" So we need to change it so that when mouse1 gets bound to +altattack, X changes around so that what it does is bind mouse1 to just +attack This is why you need set the togglefire variable string in the primfire and secfire variable strings. Then it works like this mouse1 is bound to +attack X is bound to "bind mouse1 to +altattack AND change X to "bind mouse1 to +attack"" so then you hit X and it ends up like this mouse1 is bound to +altattack X is bound to "bind mouse1 to +attack AND change X to "bind mouse1 to +altattack"" and you've got your cycle/toggle Link to comment Share on other sites More sharing options...
katanamaru Posted February 18, 2010 Share Posted February 18, 2010 I've searched through the internet but couldn't find it. I have an azerty keyboard, so ` doesn't work in dragon tool to open the console. Does anyone know how I could change the binds or how to open the console ? Otherwise I can't make animations Check this post. I was helping someone a while back who had the same problem. http://forums.filefront.com/sw-jk3-modding-mapping-editing/392790-stances-mod-help-2.html Link to comment Share on other sites More sharing options...
Dark Jedi Han Posted February 18, 2010 Author Share Posted February 18, 2010 @acdcfanbill: I'm starting to understand it now. You've explained it well, thanks @katanamaru: Works, thanks to you. I can finally start animating now Link to comment Share on other sites More sharing options...
katanamaru Posted February 19, 2010 Share Posted February 19, 2010 You're welcome. I'll still be around if you have questions. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.