N
Nozomi
Guest
These stages are really funny!!!
erf_beto said:Hey, what if instead of regular Super Mario turtles, Deadpool fights Ninja Turtles?![]()
O Ilusionista said:Its on Warmachine at my mod, Zvitor can get from there (its the "ward" entity). I tweaked it a bit to avoid walls and such.I have function to spawn object at random spot on screen.
void spawn04(void vName, float fX, float fY, float fZ)
{
//Spawns entity based on left screen edge and center of playing field
//
//vName: Model name of entity to be spawned in.
//fX: X distance relative to left edge
//fY: Y height from ground
//fZ: Z location adjustment
void self = getlocalvar("self"); //Get calling entity.
void vSpawn; //Spawn object.
int Direction = getentityproperty(self, "direction");
int XPos = openborvariant("xpos"); //Get screen edge's position
int Screen = openborvariant("hResolution"); // Get screen width
clearspawnentry(); //Clear current spawn entry.
setspawnentry("name", vName); //Acquire spawn entity by name.
if (Direction == 0){ //Is entity facing left?
fX = Screen -fX; //Reverse X direction to match facing and screen length
}
fZ = fZ+(openborvariant("PLAYER_MIN_Z") + openborvariant("PLAYER_MAX_Z") )/2 ;
vSpawn = spawn(); //Spawn in entity.
changeentityproperty(vSpawn, "position", fX + XPos, fZ, fY); //Set spawn location.
return vSpawn; //Return spawn.
}
void Rspawn4(void vName, float fX, float fY, float fZ, float Vx, float Vz)
{//Spawns other entity in random spot relative to screen edge and move it with random speed
//vName: Model name of entity to be spawned in
//fX: X deviation relative to screen edge
//fZ: Z deviation relative to center of playing field
//Vx: X speed deviation
//Vz: Z speed deviation
void self = getlocalvar("self"); //Get calling entity
int Direction = getentityproperty(self, "direction");
void vSpawn; //Spawn object
int iDX;
int iDZ;
float iVX;
float iVZ;
if(fX!=0){
iDX = rand()%fX+Edge*0.5;
} else {
iDX = 0;
}
if(fZ!=0){
iDZ = rand()%fZ;
} else {
iDZ = 0;
}
if(Vx!=0){
iVX = rand()%(10*Vx)*0.1;
} else {
iVX = 0;
}
if(Vz!=0){
iVZ = rand()%(10*Vz)*0.1;
} else {
iVZ = 0;
}
vSpawn = spawn04(vName, iDX, fY, iDZ); //Spawn in entity
changeentityproperty(vSpawn, "velocity", iVX, iVZ);
changeentityproperty(vSpawn, "direction", Direction);
}
...
@cmd Rspawn4 "Blaze" 150 0 25 0 0
frame data/chars/misc/empty.gif
@cmd Rspawn4 "Blaze" 150 0 25 0 0
frame data/chars/misc/empty.gif
@cmd Rspawn4 "Blaze" 150 0 25 0 0
frame data/chars/misc/empty.gif
@cmd Rspawn4 "Blaze" 150 0 25 0 0
frame data/chars/misc/empty.gif
@cmd Rspawn4 "Blaze" 150 0 25 0 0
frame data/chars/misc/empty.gif
but its exactly what I do with that codeWhen this animation is run, Blaze entity will be spawned 5 times in random spot on screen. Great to spawn explosions on screen or lightning bolts
Indeed! Ryu stage would be awesome.@ilu, nice ideia, some SF stage could work for his last battle, i will try ryu stage, is more iconic and a nice place to fight against ninjas