Message Log Question

  • Thread starter Thread starter Goliath
  • Start date Start date
G

Goliath

Guest
Hello there, can someone explain what exactly means this log message:

Warning: 1 script variants are not freed, dumping...
openbor_allocscreen

and more important can cause damage or malfunction to the engine?
 
Oh thanks, I thought if the program does not close well it would have consequences, and i can´t figure out where is the problem.
 
I´m trying to make dizzy effect on enemies, but not with the shock attack system but adding randomness to rise animation thats goes to a follow anim randomness (which is dizzy anim).

On dizzy anim i spawn dizzy effect stars or birds over the enemy and he has bbox activated. The problem is that if you hit him the effect stais on the air where was the enemy on dizzy anim cos stars birds is another entity whitch match in time with enem dizzy anim. So i tried to spawbind it to the enemy but the stars stays over him while he is moving and seems ridiculous.

So is there a script to kill the effect if enemy changes to pain anim or something like that?
 
You are correct by using spawnbind to show the stars and birds. The next thing you need to set is last parameter to 4.

I'm guessing you are using this function:
Code:
void spawnBind(void Name, float dx, float dy, float dz, int Dir, int Flag)
{ // Spawn entity and bind it
   void self = getlocalvar("self");
   void Spawn;

   Spawn = spawn01(Name, dx, dy, dz);
   bindentity(Spawn, self, dx, dz, dy, Dir, Flag);
}

so to achieve what you want, set last parameter to 4.
AND don't forget to set matching animation name to stars and birds text. For instance, if dizzy anim is anim PAIN5, then stars and birds must have anim PAIN5 too even if it's copy of IDLE.

I'd like to discuss the problem you mentioned above more.
Are you using update.c to show icon or something?
Even though there's no problem with error message you posted above, it's best to fix it while there's only one script variant to be freed.
 
The spawnbind script i´m using:

Code:
void spawnbind(void Name, float dx, float dy, float dz)
{ // Spawn and bind other entity i.e. flames
   void self = getlocalvar("self");
   void Spawn;

   Spawn = spawn01(Name, dx, dy, 0);
   bindentity(Spawn, self, dx, dz, dy, 0, 0);
}

Bindentity has the parameters Dir, Flag sets to 0 as spawn01 dz parameter.

And the others scripts involved:

Code:
void bind(int null, float x, float z, float y, int dir)
{//{bind/release} 1 to bind , 0 to release.
 //{X} {Z} {Y} X,Z,Y, adjustment. Counted from the attackers offset.
 //direction} 0 no change 1 same direction as target -1 opposite direction as target 2   always right -2 always left
	void self = getlocalvar("self");
	void opp = getentityproperty(self, "opponent");
	if(null == 1)
	{
		bindentity(opp, self, x, z, y, dir, 0);
	}
	else if(null == 0)
	{
		bindentity(opp, NULL());
	}
}

void spawn01(void vName, float fX, float fY, float fZ)
{
	//spawn01 (Generic spawner)
	//Damon Vaughn Caskey
	//07/06/2007
	//
	//Spawns entity next to caller.
	//
	//vName: Model name of entity to be spawned in.
	//fX: X location adjustment.
	//fZ: Y location adjustment.
    //fY: Z location adjustment.

	void self = getlocalvar("self"); //Get calling entity.
	void vSpawn; //Spawn object.
	int  iDirection = getentityproperty(self, "direction");

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

	if (iDirection == 0){ //Is entity facing left?                  
          fX = -fX; //Reverse X direction to match facing.
	}

      fX = fX + getentityproperty(self, "x"); //Get X location and add adjustment.
      fY = fY + getentityproperty(self, "a"); //Get Y location and add adjustment.
      fZ = fZ + getentityproperty(self, "z"); //Get Z location and add adjustment.
	
	vSpawn = spawn(); //Spawn in entity.

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

Tryed to use the spawnbind function you posted but whithout result.
can´t compile script error

Are you using update.c to show icon or something?

Yes copied from NightSlashersX but altered for 4 players. Still working on it though.

Minutes later... Yes you are right, modify it and works everything ok, no message errors, I´m going to spawn it "manually" cos you need to set at what anim the icon is shown, and doesn´t works as i guessed.

I´ve got:

void vSelf2 = getplayerproperty(1, "entity");
void vSelf3 = getplayerproperty(1, "entity");

Same number on both voids I think that´s the script variable not freed.
 
About spawnbind function, no wonder, you should replace it with the one I posted above AND set 5th parameter to 0 and 6th to 4.
If you have used spawnbind function elsewhere, don't forget to set those added parameters accordingly
 
Back
Top Bottom