Author Topic: Request: Particles Spawn  (Read 1301 times)

Read the title
Where I get these?!?!?

Don't even bother getting them. They're stuffty and when there is a lot of people on the server and they all spawn at the same time it causes lots of lag.

Don't even bother getting them. They're stuffty and when there is a lot of people on the server and they all spawn at the same time it causes lots of lag.
not to me, I have no problem with this. I not get any lag from this.
« Last Edit: October 22, 2013, 06:02:59 PM by Furling² »

not to me, I have no problem with this. I not get ant lag from this.
get a model and I'll make it happen

get a model and I'll make it happen
Model? Isn't it an emitter?

I found this hidden somewhere. Doesn't have all the stuff required to work I don't think (I didn't look), but it has the model and the sound. Here you go

I found this hidden somewhere. Doesn't have all the stuff required to work I don't think (I didn't look), but it has the model and the sound. Here you go
How it does work?

How it does work?
It doesn't. It's just the raw effect and the bare minimum stuff for it to work. It just needs a package to put it on players when they spawn.

datablock StaticShapeData(Tezuni_SpawnEffect)
{
   category = "Effects";
   shapeFile = "./fx01.dts";
};

function Tezuni_SpawnEffect::onAdd(%data, %obj)
{
   %obj.playThread(0, "castAnim");
   %obj.schedule(5000, "delete");
}
package spawnomg
{
   function Armor::onAdd(%this,%obj) //could just change spawn explosion but w/e
   {
      Parent::onAdd(%this,%obj);
      if(%obj.getType() & $TypeMasks::PlayerObjectType && isObject(%obj.client))
         %obj.spawnThingy();
   }
};
activatepackage(spawnomg);
function Player::spawnThingy(%obj)
{
   if(!isObject(%obj.spawnThingy))
   {
      %obj.spawnThingy=new StaticShape()
      {
         datablock=Tezuni_SpawnEffect;
         position = %obj.getPosition();
      };
   }
}

too tired to test, someone do w/e with it
thank god it has rotation animations

note:
change this to be better kthx
« Last Edit: October 23, 2013, 08:34:46 AM by MARBLE MAN »

I will test it later.

EDIT: I just did tested this script coming up errors.

Code: [Select]
Loading Add-On: Script_SpawnThingy (CRC:1795642312)
Add-Ons/Script_SpawnThingy/server.cs Line: 32 - Syntax error.
>>> Some error context, with ## on sides of error halt:
      Parent::onAdd(%this,%obj);

      if(%obj.getType() & $TypeMasks::PlayerObjectType && isObject(%obj.client))

         %obj.spawnThingy();

   }

};

activatepackage(spawnomg);

function Player::spawnThingy(%obj)

{

   if(!isObject(%obj.spawnThingy)

   {##
##
      %obj.spawnThingy=new StaticShape()

      {

         datablock=Tezuni_SpawnEffect;

         position = %obj.getPosition();

      };

   }

}
>>> Error report complete.

ADD-ON "Script_SpawnThingy" CONTAINS SYNTAX ERRORS

What about event? I can make more the particles for this.
« Last Edit: October 23, 2013, 07:19:36 AM by Furling² »

fixed 1 letter:
  if(!isObject(%obj.spawnThingy)
to
  if(!isObject(%obj.spawnThingy))

fixed 1 letter:
  if(!isObject(%obj.spawnThingy)
to
  if(!isObject(%obj.spawnThingy))

I added script brick lines.
Code: [Select]
datablock fxDTSBrickData(brickThingySpawnData)
{
shapeFile = "./fx01.dts";
category = "Special";
subCategory = "Effects Spawn";
uiName = "Magic Spawn";
iconName = "Add-ons/Script_SpawnThingy/EffectsSpawn";
        bricktype = 2;
cancover = 0;
orientationfix = 1;
specialbricktype = "Spawn";
indestructable = 1;
}

Full code:
Code: [Select]
datablock AudioProfile(Tezuni_SpawnSound)
{
   filename = "./RW_spawning.wav";
   description = AudioClose3D;
   preload = true;
};

datablock StaticShapeData(Tezuni_SpawnEffect)
{
   category = "Effects";
   shapeFile = "./fx01.dts";
};
datablock fxDTSBrickData(brickThingySpawnData)
{
shapeFile = "./fx01.dts";
category = "Special";
subCategory = "Effects Spawn";
uiName = "Magic Spawn";
iconName = "Add-ons/Script_SpawnThingy/EffectsSpawn";
        bricktype = 2;
cancover = 0;
orientationfix = 1;
specialbricktype = "Spawn";
indestructable = 1;
}

function Tezuni_SpawnEffect::onAdd(%data, %obj)
{
   %obj.playThread(0, "castAnim");
   %obj.schedule(5000, "delete");
}
package spawnomg
{
   function Armor::onAdd(%this,%obj) //could just change spawn explosion but w/e
   {
      Parent::onAdd(%this,%obj);
      if(%obj.getType() & $TypeMasks::PlayerObjectType && isObject(%obj.client))
         %obj.spawnThingy();
   }
};
activatepackage(spawnomg);
function Player::spawnThingy(%obj)
{
   if(!isObject(%obj.spawnThingy))
   {
      %obj.spawnThingy=new StaticShape()
      {
         datablock=Tezuni_SpawnEffect;
         position = %obj.getPosition();
      };
   }
}
It does not showed up when I was die to spawned. We need consider add this  brick spawn.

Error Code:
Code: [Select]
Loading Add-On: Script_SpawnThingy (CRC:1080681253)
Add-Ons/Script_SpawnThingy/server.cs Line: 27 - Syntax error.
>>> Some error context, with ## on sides of error halt:
^category = "Special";

^subCategory = "Effects Spawn";

^uiName = "Magic Spawn";

^iconName = "Add-ons/Script_SpawnThingy/EffectsSpawn";

    bricktype = 2;

^cancover = 0;

^orientationfix = 1;

^specialbricktype = "Spawn";

^indestructable = 1;

}

^

function ##T##ezuni_SpawnEffect::onAdd(%data, %obj)

{

   %obj.playThread(0, "castAnim");

   %obj.schedule(5000, "delete");

}

package spawnomg

{

   function Armor::onAdd(%this,%obj) //could just change spawn explosion but w/e

   {

      Parent::onAdd(%this,%obj);
>>> Error report complete.

ADD-ON "Script_SpawnThingy" CONTAINS SYNTAX ERRORS


The shapefile for a brick has to be a blb file. You would need a different method in order to have a spawn brick with that effect constantly.

End that fxdtsbrickdata with a semicolon!


datablock AudioProfile(Tezuni_SpawnSound)
{
   filename = "./RW_spawning.wav";
   description = AudioClose3D;
   preload = true;
};

datablock StaticShapeData(Tezuni_SpawnEffect)
{
   category = "Effects";
   shapeFile = "./fx01.dts";
};

function Tezuni_SpawnEffect::onAdd(%data, %obj)
{
   %obj.playThread(0, castAnim);
   %obj.schedule(5000,delete);
}
package spawnomg
{
   function Armor::onAdd(%this,%obj)
   {
      Parent::onAdd(%this,%obj);
      %obj.schedule(0,spawnThingy);
   }
};
activatepackage(spawnomg);
function Player::spawnThingy(%obj)
{
   new StaticShape()
   {
      datablock=Tezuni_SpawnEffect;
      position = %obj.getPosition();
   };
   serverPlay3d(Tezuni_SpawnSound,%obj.getTransform());
}


here you go.