Page 1 of 59
Mod Question Repository... Questions come in, answers go out
Posted: 13 Oct 2006, 13:28
by Snipawolf
1. Is it possible to have a metal extractor be able to make its own metal and extract it, but only work if its on a metal patch?
(By the way, if anyone has any questions, put them here.)
Posted: 13 Oct 2006, 17:45
by SpikedHelmet
AFAIK no... something like that, I believe, is up to map-makers. They can determine how much metal is outputted over "normal" ground (as opposed to on actual metal patches). I may be wrong, though. Can anyone else stipulate?
Posted: 13 Oct 2006, 18:04
by jcnossen
The idea of a forum is already that you can ask questions... you don't really have to put them in one thread
You can set a metal make and a metal extract value. The metal make will always work, and metal extract will only matter on metal spots.
Posted: 13 Oct 2006, 18:06
by FLOZi
You could detect the metal extraction level in the script and use it to activate the building - switching on the metal making. I think.
Posted: 14 Oct 2006, 17:04
by Snipawolf
Could I disable the ability to manually turn it on? What I am looking for is an extractor, that also produces bonus metal, but only can be turned on if its extracting..
Maybe I can script it or something, but I don't want people building mexes just for the free metal
(PS: I am forcefully taking over spring maps, I am hardly going to use the extractor for the metal, I am going to just make it make metal... But I need it to have to be made on a metal patch)
If any of that got through to you, thanks for your help..
Posted: 14 Oct 2006, 17:48
by zwzsg
Snipawolf wrote:Could I disable the ability to manually turn it on?
Onoffable=0; in the FBI.
Posted: 14 Oct 2006, 17:51
by Snipawolf
So then, I could use some fancy scripting, and make it to where it produces as much metal as I want, but only on a metal patch/when extracting?
Posted: 14 Oct 2006, 18:01
by rattle
I have a different idea. You could use a huge extraction radius (visually) and then check inside of that radius by script if there's another extractor. If there is none, then the building activates and produces resources. It's independent from mex spots though and probably doesn't work quite out on smaller maps.
Posted: 14 Oct 2006, 18:21
by Snipawolf
That's an interesting idea..
Posted: 14 Oct 2006, 18:24
by rattle
Hm one resource generator could cover 25% of an 8x8 (or 4x4) map, then it'd work out. This forces the player to expand as well because he needs territory.
Posted: 14 Oct 2006, 18:32
by Dragon45
Just go with the original idea of onoffable=0 and turn it on via script only if its on a metal patch.
The toher idea about checking forother extractors is much more expesnive and much more difficult and buggy.
Posted: 15 Oct 2006, 03:34
by Snipawolf
Another one, and I am going to favorite this topic, I don't wanna lose it..
Q: I forgot how, but could someone supply me with a random burst script from 10-20 bullets?
Posted: 15 Oct 2006, 03:42
by Dragon45
Wouldn't a regular custom weapon with the appropriate accuracy and burst radius etc values work just fine?
Posted: 15 Oct 2006, 03:46
by rattle
Snipawolf wrote:Another one, and I am going to favorite this topic, I don't wanna lose it..
Q: I forgot how, but could someone supply me with a random burst script from 10-20 bullets?
Code: Select all
#define MAX_ROUNDS 2
#define RAND_AMMO rand(10,20)
#define TIME_BETWEEN_ROUNDS rand(100,500)
#define RELOAD_TIME 5000
#define SHOW_RELOAD_SYMBOL show reload_symbol;
#define HIDE_RELOAD_SYMBOL hide reload_symbol;
static-var ammo, rounds;
ammo = RAND_AMMO;
rounds = MAX_ROUNDS;
AimWeaponX()
{
signal SIG_AIM_X;
set-signal-mask SIG_AIM_X;
if (!ammo OR !rounds) return FALSE;
...
}
FireWeaponX()
{
if (ammo) --ammo;
else
{
if (rounds) --rounds;
else
{
SHOW_RELOAD_SYMBOL
sleep RELOAD_TIME;
HIDE_RELOAD_SYMBOL
rounds = MAX_ROUNDS;
}
sleep TIME_BETWEEN_ROUNDS;
ammo = RAND_AMMO;
}
}
Use a low reload time for that in the weapon tdf.
edit: Duh goddamn spammers

Posted: 15 Oct 2006, 03:49
by Snipawolf
yeah, but what connects the ammo to the TDF... I still dislike scripting X.x
Posted: 15 Oct 2006, 03:51
by rattle
Nothing. You have to do random bursts by scripting.
Posted: 15 Oct 2006, 03:52
by Snipawolf
DUH, it makes sense... It fires weapon, using the ammo, eh?
Could this be used to make two burst fires in a row, say, 10 shots each time?
Posted: 15 Oct 2006, 04:17
by rattle
Edited. Should work, didn't test it though...
Posted: 15 Oct 2006, 04:38
by Snipawolf
I'm probably going to remember that
Seems easy enough... I'll have scripting totally learned in a few weeks, when I start scripting..
Posted: 15 Oct 2006, 19:01
by Snipawolf
I don't know how its supposed to be, but I know how it works..
We can fire weapons using scripts? We have dynamic blood..
Fire a weapon like 2 feet in front of the guy using a script, and the "Burnmark" on the ground can be a bloody splat?
Would dat work?