NightOfHorror wrote:The small one is a little to quick and quiet, but the rest are fine.
int level = 0;
view.y = level * view.height;
KeyDown->Space->ScriptEditor->
missile_limit-=1;
missile_limit=missile_limit>0;
DrawActor->ScriptEditor->
MissileLimit.textNumber=missile_limit;
missile_limit-=1;
missile_limit=missile_limit>0; // this line right here sets it equal to missile_limit>0
missile_limit -= missile_limit>0;
#define OverHeatNumber 100
#define HeatRate 10
#define CoolRate 2
//The above state how hot your gun must be before over heating, how fast it heats up, and how fast it cools down respectively
int IsOverheated = 0;//If the gun is overheated
int Heat;//How hot your gun is
Heat -= (Heat > 0) * CoolRate;//Cool your gun down a bit
if(!Heat)//If your gun has fully cooled off...
{
IsOverheated = 0;//Then your gun is no longer over heated
}
else if(Heat > OverHeatNumber)//However, if the gun is hotter than it should be...
{
Heat = OverHeatNumber;
IsOverheated = 1;//Then it is overheated
}
if(!IsOverHeated)//If your gun is not overheated...
{
//Spawn your bullet here
Heat += HeatRate;//Heat it up a bit
}
NightOfHorror wrote:I like it a lot, can you put them all in separate links now.
missile_limit = max(missile_limit, 0); // if missile_limit is less than zero, then max will return 0
Users browsing this forum: No registered users and 1 guest