Author Topic: Mounting emitters to weapon joints?  (Read 2179 times)

I got my average script, I just need to know how to do this. Spoonfeeding is very much appreciated, I already know how to do crap.

Edit: I got this:
Code: [Select]
stateName[0]                   = "Activate";
stateTimeoutValue[0]           = 0.15;
stateTransitionOnTimeout[0]    = "Ready";
//stateSound[0]                  = "";

stateName[1]                   = "Ready";
stateTransitionOnTriggerDown[1]= "Fire";
stateAllowImageChange[1]       = true;
stateEmitter[1]                = WoodenStaffEmitter;
stateEmitterTime[1]            = 300;

stateName[2]                   = "Fire";
stateTransitionOnTimeout[2]    = "Reload";
stateTimeoutValue[2]           = 1.80;
stateFire[2]                   = true;
stateAllowImageChange[2]       = false;
stateSequence[2]               = "Fire";
stateScript[2]                 = "onFire";
stateWaitForTimeout[2]         = true;
//stateSound[2]                  = "";

stateName[3]                   = "Reload";
stateTransitionOnTriggerUp[3]  = "Ready";
« Last Edit: March 30, 2013, 02:20:53 AM by Honorabl3 »

Oh a new post in coding help! Time to go help
I got my average script, I just need to know how to do this. Spoonfeeding is very much appreciated, I already know how to do crap.
this
Spoonfeeding is very much appreciated, I already know how to do crap.
person
Spoonfeeding is very much appreciated
out...

by weapon joints do you mean nodes/bones/whateveryouliketocallthemhere

Yes, how do I mount the emitter to my joint: "muzzlePoint"?

it's not complicated

you really should have looked harder at other code
you could have really easily found this without revealing you want spoon feeding instead of actually learning.

you could have really easily found this without revealing you want spoon feeding instead of actually learning.
Spoon feeding is learning for me. Some people are able to take what they are handed, and figure out how to use it.

Thank you kind sir.

Didn't work? The emitter remains on the mountPoint?



Proof of Joint name:
« Last Edit: March 30, 2013, 03:13:07 AM by Honorabl3 »

Spoon feeding is learning for me. Some people are able to take what they are handed, and figure out how to use it.

Spoon feeding isn't learning, you're just too lazy to either figure it out or write it on your own. This is exactly why we have so many stupid chat-bots

God damn, you're like NAT3 all over again.
« Last Edit: March 30, 2013, 07:25:20 AM by Little Anarchist »

alright honerable
im going to give you this computer.
i want you to learn how to make every component and the computer.

this is basically what you say you can do.

alright honerable
You misspelled my name.

i want you to learn how to make every component and the computer.
I wouldn't need to learn something that I already know. Kill me if I find a new piece I don't know the name of.



Spoon feeding isn't learning,
Spoon feeding can be learning, it just depends how people use the information they are given.

you're just too lazy to either figure it out or write it on your own.
I couldn't think of a single add-on that had an emitter displayed upon it. I was not aware of the default gun, having the emitter.

This is exactly why we have so many stupid chat-bots
You have so many chat-bots because people don't want to learn.

chat-bots
And for some reason, you linked me to a chat-bot help page? Of which, I have NO need for.

God damn, you're like NAT3 all over again.
Don't compare me to another person.

If your not going to help, get the forget off this board.



Spoon-feeding is beautiful thing. Most people just perceive it as evil, and wretched. Spoon-feeding is helpful, it's just how you use the information. I for one, handle spoon-feeding very seriously. I don't just, "use" what people give me. I study it, and figure out how it's going to help.

For example. When you first learned to script, did you not look at already-made-add-ons?

you don't need your joints like that unless you do animations


Get off your loving powertrip dude you're acting like a complete douchebag, if you knew everything you wouldn't have posted this topic, this board is for Coding Help. Not "Give Incompetent Users Code They Can Copy Paste", I linked you that chat-bot to show you an example of what spoon-feeding can do to someone.

And I didn't learn programming from Blockland, but while I was learning TorqueScript I did indeed read other code to add-ons after reading the documentation, I don't see how your statement about reading code is relevant to the argument though.
« Last Edit: March 31, 2013, 07:29:30 AM by Little Anarchist »

i wish there was a mountEmitter function so i could mount like dark/light or water/fire to different staves without wasting badspots ancient precious datablocks.

if you knew everything you wouldn't have posted this topic
I was trying to get the point across, that I would appreciate spoon-feeding. As that would have been much more faster to just get my answer. I pulled two all-nighters. And when posting that first post, I haven't slept in 50+ hours..

i wish there was a mountEmitter function so i could mount like dark/light or water/fire to different staves without wasting badspots ancient precious datablocks.
States?

States?
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.

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.

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.

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.
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:

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.
« Last Edit: March 31, 2013, 08:10:50 PM by Daenth »