16
Modification Help / Re: Mounting emitters to weapon joints?
« on: March 31, 2013, 07:20:26 PM »too bad you cant dynamically edit states remotely like how i suggested. i don't want 50 image datablocks just to have different staves. what if i want a wood staff that can change elements? ok, then i create a bunch of datablocks. what if i want a metal staff, or a cyber staff. then i have to double the initial datablock count for EVERY SINGLE staff type i would like.While I agree it'd be nice to be able to do those things, you can have up to 4 different emitters per image through states. Like so:
i want to mount emitters onto the default sword for a swing trail, and depending on your power level, the trail should be different colors. oh wait! can't dyamically edit those colors! the swing trail should look different depending on your mood, it should be cloudly if you're confused and straight if you're certain. give it a fiery texture if you're mad too.
oh, and team colored weapons would be awesome as well! weapons and particles are blue if you're on blue. thats double the datablocks, not too bad. what about green, orange, red, purple, white, and black team too?
i can't do these things without doubling or tripling or quadrupling datablock count. datablocks are an archaic and ancient method. i should be able to just setNodeColor on weapons, mountEmitter on images, setEmitterColor on mounted emitters, and do all these things without having to create new datablocks. i can change the color on my player to just about anything, yet i can't change my color on a weapon without an entire new datablock.
Code: [Select]
function toggleEmitterState(%obj) {
if(%obj.currentImageState $= "" || %obj.currentImageState > 2)
%obj.currentImageState = 0;
else
%obj.currentImageState++;
switch(%obj.currentImageState) {
case 0:
%obj.setImageLoaded(%slot,0);
%obj.setImageAmmo(%slot,0);
case 1:
%obj.setImageLoaded(%slot,1);
%obj.setImageAmmo(%slot,0);
case 2:
%obj.setImageLoaded(%slot,1);
%obj.setImageAmmo(%slot,1);
case 3:
%obj.setImageLoaded(%slot,0);
%obj.setImageAmmo(%slot,1);
}
}
datablock ShapeBaseImageData(datablockName) {
stateName[0] = "Activate";
stateTimeoutValue[0] = 0.1;
stateTransitionOnTimeout[0] = "NoLoadedNoAmmo";
stateName[1] = "NoLoadedNoAmmo";
stateAllowImageChange[1] = true;
stateTransitionOnLoaded[1] = "LoadedNoAmmo";
stateTransitionOnAmmo[1] = "NoLoadedAmmo";
stateEmitterNode[1] = emitterPoint;
stateEmitterTime[1] = 0.2;
stateEmitter[1] = emitterName;
stateTimeoutValue[1] = 0.1;
stateTransitionOnTimeout[1] = "NoLoadedNoAmmo";
stateName[2] = "LoadedNoAmmo";
stateAllowImageChange[2] = true;
stateTransitionOnNotLoaded[2] = "NoLoadedNoAmmo";
stateTransitionOnAmmo[2] = "LoadedAmmo";
stateEmitterNode[2] = emitterPoint;
stateEmitterTime[2] = 0.2;
stateEmitter[2] = emitterName;
stateTimeoutValue[2] = 0.1;
stateTransitionOnTimeout[2] = "LoadedNoAmmo";
stateName[3] = "NoLoadedAmmo";
stateAllowImageChange[3] = true;
stateTransitionOnLoaded[3] = "LoadedAmmo";
stateTransitionOnNoAmmo[3] = "NoLoadedNoAmmo";
stateEmitterNode[3] = emitterPoint;
stateEmitterTime[3] = 0.2;
stateEmitter[3] = emitterName;
stateTimeoutValue[3] = 0.1;
stateTransitionOnTimeout[3] = "NoLoadedAmmo";
stateName[4] = "LoadedAmmo";
stateAllowImageChange[4] = true;
stateTransitionOnNotLoaded[4] = "NoLoadedAmmo";
stateTransitionOnNoAmmo[4] = "LoadedNoAmmo";
stateEmitterNode[4] = emitterPoint;
stateEmitterTime[4] = 0.2;
stateEmitter[4] = emitterName;
stateTimeoutValue[4] = 0.1;
stateTransitionOnTimeout[4] = "LoadedAmmo";
}EDIT: Fixed some stuff.