Author Topic: How do I make full-automatic weapons?  (Read 856 times)

I want to make War-Machine a good machine-gun that's built-in to his arm, but I don't know how to make weapons be automatic.

By editing the state timeouts in the weapons image.

Also shotgun type projectiles.

By editing the state timeouts in the weapons image.
So I just make all the timeouts be 0? Also do I need to add
Code: [Select]
state[#] = "Fire";
statetransitionontriggerdown[#] = "fire";
Is this right?

So I just make all the timeouts be 0? Also do I need to add
Code: [Select]
state[#] = "Fire";
statetransitionontriggerdown[#] = "fire";
Is this right?

Ok thanks. Also, what program do you use for coding?



I suppose that means it's not free?
Notepad++ is an amazing free code editor. I use it for all of my stuff.
http://notepad-plus-plus.org/

Ok. Where do I get it?


the forget static? he wants to know how to make a weapon fully auto, not change the timing between states.

i hate to spoon feed, but i have a feeling i cant really explain this sort of thing too well, as it is much more complicated then changing a few variables

this should work, you can skip all the modeling stuff and go straight to the coding instructions.  download the full auto example scripts.
http://forum.blockland.us/index.php?topic=78760.0

alternatively, you can replace your semi auto states with these basic full auto states, remember to change the "nameofYour" thing to their actual names.
Code: [Select]
stateName[0]                     = "Activate";
stateTimeoutValue[0]             = 0.15;
stateTransitionOnTimeout[0]       = "Ready";
stateSound[0] = weaponSwitchSound;

stateName[1]                     = "Ready";
stateTransitionOnTriggerDown[1]  = "Fire";
stateAllowImageChange[1]         = true;
stateSequence[1] = "Ready";

stateName[2]                    = "Fire";
stateTransitionOnTimeout[2]     = "Smoke";
stateTimeoutValue[2]            = 0.14;
stateFire[2]                    = true;
stateAllowImageChange[2]        = false;
stateSequence[2]                = "Fire";
stateScript[2]                  = "onFire";
stateWaitForTimeout[2] = true;
stateEmitter[2] = NameOfYourGunFlashEmitter;
stateEmitterTime[2] = 0.05;
stateEmitterNode[2] = "muzzleNode";
stateSound[2] = NameOfYourGunShot1Sound;
stateEjectShell[2]       = true;

stateName[3] = "Smoke";
stateEmitter[3] = NameOfYourGunSmokeEmitter;
stateEmitterTime[3] = 0.05;
stateEmitterNode[3] = "muzzleNode";
stateTimeoutValue[3]            = 0.01;
stateTransitionOnTimeout[3]     = "Reload";

stateName[4] = "Reload";
stateSequence[4]                = "Reload";
stateTransitionOnTriggerDown[4]  = "Fire";
stateTransitionOnTriggerUp[4]     = "Ready";
stateSequence[4] = "Ready";
« Last Edit: February 09, 2015, 12:40:10 AM by zombekillz »

Um... sorry... I already figured this out.