Page 12 of 59
Posted: 02 Jul 2007, 16:40
by Snipawolf
I think it would, one sound instead of.. At least 100 per second..
Another question..
This is quite pathetic that I don't know how to do this already..
I wanna make a unit turn on and off, off makes it use no metal, but makes it generate some energy. On makes it burn more metal to make more energy..
How would I do this? Could I put a check in the Cob to make sure I can have my extra effects enabled during this time?
Posted: 02 Jul 2007, 17:01
by KDR_11k
Snipawolf wrote:I think it would, one sound instead of.. At least 100 per second..
32. Spring won't do anything faster than 32 times per game second.
I wanna make a unit turn on and off, off makes it use no metal, but makes it generate some energy. On makes it burn more metal to make more energy..
How would I do this? Could I put a check in the Cob to make sure I can have my extra effects enabled during this time?
Negative UseEnergy. I don't know if it'll keep producing energy when you're out of metal but I know you can't make the effect disable when the unit lacks the resources.
Posted: 02 Jul 2007, 17:04
by Snipawolf
Yeah, I forgot to say I was using 2 Weapons, 1 slaved, to each Mgun, and it has 2 actual Mguns..
128.. 4 times the "limit"
It's meant to be turned on and off, so.. Is there any way cob could get that? Activation?
Posted: 02 Jul 2007, 17:07
by KDR_11k
get ACTIVATION returns 1 if the unit is on, 0 otherwise.
You'll probably be albe to dump the slaved MGs by using Projectiles=2 in 75b1, if my patch gets committed that is. I don't think you really need that many projectiles, though.
Posted: 02 Jul 2007, 17:08
by Snipawolf
Well, I could make an effect for the bullet explosion that spawns several more dust clouds, making it look like 3 or 4 bullets hit instead of 1.. That could work..
Thanks for all the help..
Posted: 02 Jul 2007, 20:40
by rattle
Snipawolf wrote:HHHHeeeeyyy...
If I use one long continuous, instead of making a sound everytime a bullet is fired in a burst, will it reduce lag?..
The less sounds played at the same time the better.
Posted: 02 Jul 2007, 20:47
by smoth
rattle wrote:Snipawolf wrote:HHHHeeeeyyy...
If I use one long continuous, instead of making a sound everytime a bullet is fired in a burst, will it reduce lag?..
The less sounds played at the same time the better.
do like I did, time the sound effect to a burst weapon. 1 sound is played for three shots every time a machine gun is fired in gundam(yellow machine gun)
Posted: 05 Jul 2007, 19:18
by Snipawolf
I do do that... I just make a sound, and the faster it shoots, the higher pitched and faster I make the bullets..
Metal Storm.. 1 Million rounds per minute!!!
One sounds like a beep, the 1 Mill one sounds like a cannon xD
Ahh, why.. Why Why why!?
I know why.. Snipa still is a total newb...
It never works right, I studied other peoples, I can't get my units to build correctly..
Here is EVERYTHING relevant to my engy, who has a hard time building unless its at two buildtime...
Code: Select all
builder=1;
builddistance=100;
WorkerTime=100;
Code: Select all
#define SIG_ACTIVATE 2
#include "STANDARD_COMMANDS_GPL.h"
Activate()
{
signal SIG_ACTIVATE;
IsBuilding=1;
}
Deactivate()
{
signal SIG_ACTIVATE;
set-signal-mask SIG_ACTIVATE;
IsBuilding=0;
set-signal-mask 0;
}
BuildScript()
{
while(1)
{
if(IsBuilding)
{
set INBUILDSTANCE to 1;
sleep 500;
}
while(!IsBuilding)
{
set INBUILDSTANCE to 0;
sleep 500;
}
}
}
Create()
{
Start-Script BuildScript();
}
That's all.. I think, if not, then I'm doin it wrong...
Edit: Another question, does anybody know offhand how the planes burning and crashing to the ground works? I would like to know...
Posted: 05 Jul 2007, 23:37
by Snipawolf
Revisiting the question that started this thread..
The mex that doesn't extract it, yet only produces metal on a metal spot.. (It's a lot easier to balance when all maps give the same amount of metal, and sticks a lot closer to my idea)
How would I go about scripting that, how would I find a way to get if its on metal or not? Activation perhaps?
Then, how could I tell the unit to make more metal from the cob? O.o
Posted: 06 Jul 2007, 07:24
by yuritch
You can (sort of) guess if the building is on a metal spot or not by using SetSpeed COB function. This is called by the engine and is used since OTA times to set the speed at which the top of the mex rotates. Take note that the top won't rotate if you place an OTA (and probably AA, BA etc.) mex on a place with no metal. So, you should check the value which is passed to that function and if its not 0, you have some metal under your building.
Code: Select all
static-var MexSpeed, bIsOnMetal;
SetSpeed(NewSpeed)
{
MexSpeed=NewSpeed;
if(MexSpeed>0)
{
bIsOnMetal=TRUE;
} else
{
bIsOnMetal=FALSE;
}
}
The only way that I know of to control the amount of metal produced is by using set ACTIVATION. For example, if you want to produce 60% of maximum, you can do it like this:
Code: Select all
ProductionControl()
{
var i;
i=1;
while(TRUE)
{
++i;
if(i>10)
{
i=1;
}
if(i<7)
{
set ACTIVATION to 1;
} else
{
set ACTIVATION to 0;
}
sleep 100;
}
}
This way, the building is ON 60% of the time and so it produces 60% of its max metal output on average.
Posted: 06 Jul 2007, 11:13
by KDR_11k
Also be careful, people will figure out how they can split a metal spot between as many mexes as possible so that all of them are above the threshold.
Posted: 06 Jul 2007, 12:45
by theHive
KDR_11k wrote:Also be careful, people will figure out how they can split a metal spot between as many mexes as possible so that all of them are above the threshold.
Not to mention non-TA style metal-maps, that'll get hectic

Posted: 06 Jul 2007, 13:52
by Snipawolf
Hehe, then fuck the metal spots..
I'll let people build wherever, that would still work, I'll just make space a resource...
I'll restore them back to their 10x10 size then

Posted: 06 Jul 2007, 14:42
by KDR_11k
Oooh, Gundam style econ, eh?
Posted: 08 Jul 2007, 05:03
by Snipawolf
Well, might as well..
In my original idea for a game, you would fight over provinces and build resource producing facilities, but there would be a limit of 5. Which means you would need more provinces to feed your Wehrmacht.. Errm, War machine...
Learning German is fun

Posted: 19 Jul 2007, 05:14
by Snipawolf
Well, now I encounter a problem.
I found out the script for me engineer wasn't workin, so he wasn't getting set inbuildstance.
Now he is, but now I have to right click after I tell him to build or else he doesn't build as fast as he is supposed to...
I wonder why this is...
Posted: 19 Jul 2007, 07:37
by KDR_11k
Terraforming?
Posted: 19 Jul 2007, 07:43
by Snipawolf
I don't think its terraforming... I'll check if removing levelground=1 makes a diff though...
Edit: Nope, no change...

Posted: 19 Jul 2007, 21:45
by Archangel of Death
Removing or setting to 0? The default value is probably 1. Just saying because its one of those little things someone might not think of sometimes.
Posted: 19 Jul 2007, 21:51
by Snipawolf
Huhmm
Lemme check if setting to 0 works, then...
Ohh.. Damnit, it does work like that..
I thought all the tags were supposed to default to 0 unless they were floats...
Thanks for the help
