Have one entity spawn another at exact coords

DJGameFreakTheIguana

Active member
Basically what it says there in the title, I need a way to have one entity spawn another but at specifies coords, regardless of it's own position. I plan to make enemies do this via death animation.

X)
 
You can use this modified function:
Code:
void spawn0(void vName, float fX, float fY, float fZ)
{
	//Spawns entity at defined coords
	//
	//vName: Model name of entity to be spawned in.
	//fX: X coordinate
	//fY: Y height from ground
        //fZ: Z coordinate

	void self = getlocalvar("self"); //Get calling entity.
	void vSpawn; //Spawn object.

	clearspawnentry(); //Clear current spawn entry.
        setspawnentry("name", vName); //Acquire spawn entity by name.

	vSpawn = spawn(); //Spawn in entity.

	changeentityproperty(vSpawn, "position", fX, fZ, fY); //Set spawn location.
	return vSpawn; //Return spawn
}

This function spawns entity at defined coords
BTW you can rename the function if you wish. I removed the number to prevent conflict with other functions I already made
 
Sorry, need to bump this for a similar problem, I need a way to summon an entity based on the screen position, so that I can spawn panel type text in the middle of the screen no matter where you are, as there's no guarantee you'll kill the specific enemy at the center of the screen.

The text in the screenshot below was spawned by a dead enemy that blink out when I took the shot.

X)
 

Attachments

  • bor - 0041.png
    bor - 0041.png
    22.9 KB · Views: 7
Back
Top Bottom