DJGameFreakTheIguana
Active member
I'm working on a new mod for this SAGE expo thing coming up, which I got till July 15 to register for booths. It's a defense AND offense game where you have a machine that spawns NPC's(If you know them) and you have to keep it from getting destroyed by enemies who are being spawned from 7 different spawners, one of them being the master spawner you have to take down in order to fight the boss. There's functions for this wanna add but need help with:
-Getting the spawners to use random freespecial animations for spawning enemies, I currently do it by looping the idle animation. The best way I can think of is by setting some kind of script at the end of it's Idle animation.
-Since there will be so many enemies on the screen, I need to be able to somehow force the boss to spawn regardless of how many enemies on present on the screen, or script an enemy to be a boss even if not listed in the level txt file, like if it had "Boss 1" in it's header if that's somehow possible.
-There will be shops to buy power ups(copied the scripts from Mixmasters, could never figure it out), but I want to set it up so that you instantly gain that power up without needing to grab an item for it's weapon number.
-Ending the game when the NPC spawner is destroyed, or set level skip at the end of it's death animation to restart the level.
EDIT:
I just found this script:
Anyway to edit that for random free specials?
x)
-Getting the spawners to use random freespecial animations for spawning enemies, I currently do it by looping the idle animation. The best way I can think of is by setting some kind of script at the end of it's Idle animation.
-Since there will be so many enemies on the screen, I need to be able to somehow force the boss to spawn regardless of how many enemies on present on the screen, or script an enemy to be a boss even if not listed in the level txt file, like if it had "Boss 1" in it's header if that's somehow possible.
-There will be shops to buy power ups(copied the scripts from Mixmasters, could never figure it out), but I want to set it up so that you instantly gain that power up without needing to grab an item for it's weapon number.
-Ending the game when the NPC spawner is destroyed, or set level skip at the end of it's death animation to restart the level.
EDIT:
I just found this script:
Code:
void attack1(int RxMin, int RxMax, int RyMin, int RyMax, void Ani)
{// Attack interruption with range check
void self = getlocalvar("self");
void target = findtarget(self); //Get nearest player
float x = getentityproperty(self, "x");
float y = getentityproperty(self, "a");
int dir = getentityproperty(self, "direction");
if(target!=NULL()){
float Tx = getentityproperty(target, "x");
float Ty = getentityproperty(target, "a");
float Disx = Tx - x;
float Disy = Ty - y;
if( Disx >= RxMin && Disx <= RxMax && Disy >= RyMin && Disy <= RyMax && dir == 1) // Target within range on right facing?
{
performattack(self, openborconstant(Ani)); //Change the animation
} else if( Disx >= -RxMax && Disx <= -RxMin && Disy >= RyMin && Disy <= RyMax && dir == 0) // Target within range on left facing?
{
performattack(self, openborconstant(Ani)); //Change the animation
}
}
}
x)