Tremulous Forum
General => Feedback => Topic started by: Roanoke on January 17, 2009, 10:36:07 pm
-
How about a client side option that changes how buying conflicts are resolved. Currently, if I try to buy a bsuit with a battpack on, I won't be able to. However, there should be an option to make it so that the battpack is sold, but only if I can afford the bsuit. This will really help me out when making buy binds that attempt to buy bsuits, but could fail. If they do fail, I'd like them to keep any backpacks I have on.
-
Sorry Raonoke, but that sounds difficult to code for a simple problem. I understand, it happened to me too before I fixed my binds, especially when I wanna buy a b-suit but I have a helm on in the heat of a battle. The solution is to fix up your binds, make it so when you buy a b-suit that you sell your light armor and helmet too. Heres an example of doing this:
bind z "sell larmour; sell helmet; buy bsuit"
Try copying the above code and fix it up in your configs, cheers.
-
sell upgrades works as well
-
I know that works, but I integrate that into my weapon binds. It sells upgrades and then tries to buy bsuit, larmour, and helmet in that order. However, I will lose any backpacks in this if I can't afford a bsuit.
-
You may be looking for:
bind key "sell weapons; sell upgrades; buy bsuit; buy larmour; buy helmet; buy prifle; buy battpack; buy rifle; itemact prifle"
It will buy you a battlesuit if you have enough cash, if not, you get a light armour+helmet+battpack.
If you do not have enough money for the weapon, you get a rifle instead of a blaster.
I hope this helps you.
Sorry if I misunderstood,
Whales
-
In all fairness, scripting binds would become much better if there was support for testing the success of a previous command. An example is how the Linux bash shell accomplishes this, using && and || separators in addition to semicolons. && would mean "proceed if previous command was successful", while || would do the opposite. ; could continue to do what it does now.
-
I believe there is a patch for ioq3 that adds very simplistic bash-style scripting to the console.
-
I believe there is a patch for ioq3 that adds very simplistic bash-style scripting to the console.
but none of the commands have return values (and can't, they're asyncronous)
-
You may be looking for:
bind key "sell weapons; sell upgrades; buy bsuit; buy larmour; buy helmet; buy prifle; buy battpack; buy rifle; itemact prifle"
It will buy you a battlesuit if you have enough cash, if not, you get a light armour+helmet+battpack.
If you do not have enough money for the weapon, you get a rifle instead of a blaster.
I hope this helps you.
Sorry if I misunderstood,
Whales
You did misunderstand, what if I have a jet? The script can't figure out what backpack I had before the selling. This is why I am making this suggestion.
-
Just put jetpack and battpack on an exclusive bind and toggle between them.
-
Yep. Why not use something like
/bind J "sell battpack; buy ammo; buy jetpack; itemact jetpack;"
/bind B "sell jetpack; buy battpack;
You just need two additional keys, B and J, and that's it. Works perfectly for me.
-
It wouldn't be hard to code a default action of selling everything that conflicts with your purchase, but it's questionable if it is what you want, and it could be confusing to newbies who buy a battlesuit lasgun and battpack and then HEY WHAT HAPPENED TO MY BATTLESUIT THIS GAME SUCKS.
Perhaps yet another userinfo cvar would do the trick.
-
Personally I have three binds which cycle through: 1. Weapon 2. Armour 3. Helmet and a fourth bind to buy all that when I'm at an armoury. It doesn't tell you how much money they cost, or give you warnings conflicts, but it does allow you to set up any combination on the move, and provided you know what you can and can't have it works flawlessly.
-
Just put jetpack and battpack on an exclusive bind and toggle between them.
Well, yes, that's possible, but it's an extra step.
It wouldn't be hard to code a default action of selling everything that conflicts with your purchase
Well, that's what I'm talking about here. However, it only sells it if you can afford whatever conflicts. This could be disabled by default.
-
A new command (forcebuy?) would be better, so you don't have to use it on all binds.