Author Topic: Player-bound emitter that doesn't use a node  (Read 666 times)

I need an emitter that doesn't use the player's 4th node. essentially instead of it staying mounted to the  player's node, it will just be hacky and spawn the particles based on the player's transform.

It's a simple script and i need someone to make it

even better: still use node system but mount an invisible bot to the player at the relevant node to carry the image

even better: still use node system but mount an invisible bot to the player at the relevant node to carry the image
loving genius

loving genius
basically you find out the more and more you code for blockland the best solution to everything is creating a bot and mounting it to something or creating a bot and mounting it to another bot to mount to something else

gist:

datablock PlayerData(EmptyHoleBot) {
    shapefile = "base/data/shapes/empty.dts";
    emap = 1;
};


then later on


%pl.emitterBot = new AiPlayer(EmitterBots) {
    datablock = EmptyHoleBot;
};
%pl.mountObject(%pl.emitterBot, %slot);
%pl.emitterBot.mountImage(%img, %slot);


and make sure to package armor::onRemove to delete the bot when the player dies. and of course dont create multiple emitterbots/check if the emitterbot exists.