Author Topic: Making an image have a constant emitter  (Read 263 times)

i'm trying to make unusuals. i added a stateEmitter[0] into the eval string and assigned it to BurnEmitterB but whenever i mount the image nothing shows up. i have no other images mounted. i assume that the first state is called when the item is mounted. fyi the eval string is being built up for each hat and executed with stateEmitter[0] = BurnEmitterA in the string so maybe it's because it's being evaluated after the server sets up datablocks and because of that states can't be assigned or updated after that point? idk

need stateEmitterTime[#] = seconds;

How do I make it last forever

Maybe you could just set up a looping state system. When you equip the item go to the state that applies the emitter for x seconds. When x seconds runs out go to another state that also applies the emitter for x seconds and then loop back to the first state when that runs out.

loop between two passive states, like "Ready0" and "Ready1" on a timeout basis. eg

stateName[0] = "Ready0";
stateTransitionOnTimeout[0] = "Ready1";
stateTimeoutValue[0] = 100;
stateTransitionOnTriggerDown[0] = "Fire";
stateEmitter[0] = "emitterDB";
stateEmitterTime[0] = 1000;
stateEmitterNode[0] = "muzzlePoint";

stateName[1] = "Ready1";
stateTransitionOnTimeout[1] = "Ready0";
stateTimeoutValue[1] = 100;
stateTransitionOnTriggerDown[1] = "Fire";
stateEmitter[1] = "emitterDB";
stateEmitterTime[1] = 1000;
stateEmitterNode[1] = "muzzlePoint";

Tf2 scout pack and medic pack are examples if you want to look into it more