hi
iam trying to modify the spawn02 script... to work with the level panel coordinates like the ( noscpos ) does.
i cant seem to get it working...
these are the scripts
-------------noscpos
--------------spawn02
anyone know how to set the script to spawn the entity based on the panel coordinates ???
iam trying to modify the spawn02 script... to work with the level panel coordinates like the ( noscpos ) does.
i cant seem to get it working...
these are the scripts
-------------noscpos
// Removes scroll pos effect
void main()
{
void self = getlocalvar("self"); //Get calling entity.
int x = getentityproperty(self,"x"); //Get character's x coordinate
int XPos = openborvariant("xpos");
changeentityproperty(self, "position", x - XPos);
}
--------------spawn02
void spawn02(void vName, float fX, float fY, float fZ)
{
//Spawns entity based on left screen edge
//
//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 XPos = openborvariant("xpos"); //Get screen edge's position
clearspawnentry(); //Clear current spawn entry.
setspawnentry("name", vName); //Acquire spawn entity by name.
fZ = fZ + getentityproperty(self, "z"); //Get Z location and add adjustment.
vSpawn = spawn(); //Spawn in entity.
changeentityproperty(vSpawn, "position", fX + XPos, fZ, fY); //Set spawn location.
return vSpawn; //Return spawn.
}
anyone know how to set the script to spawn the entity based on the panel coordinates ???