Mod Question Repository... Questions come in, answers go out
Moderator: Moderators
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?
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?
32. Spring won't do anything faster than 32 times per game second.Snipawolf wrote:I think it would, one sound instead of.. At least 100 per second..
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.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?
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)rattle wrote:The less sounds played at the same time the better.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?..
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...
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...
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();
}
Edit: Another question, does anybody know offhand how the planes burning and crashing to the ground works? I would like to know...
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
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
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.
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:
This way, the building is ON 60% of the time and so it produces 60% of its max metal output on average.
Code: Select all
static-var MexSpeed, bIsOnMetal;
SetSpeed(NewSpeed)
{
MexSpeed=NewSpeed;
if(MexSpeed>0)
{
bIsOnMetal=TRUE;
} else
{
bIsOnMetal=FALSE;
}
}
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;
}
}
-
- Posts: 854
- Joined: 28 Jan 2005, 18:15