Nope, the script doesn't use the Z key anymore. You need to use the gold dig ai mode to swap, the way CaveCricket intended it. (The scripts are his.) To keep a long explanation short: It works fine now.
Edit: Actually, realised I never tested it, and it DOES teleport all identical guns to the actor changing firing mode. -_- Sorry. I guess it's a small improvement since before the change all guns but one were removed completely.
*sigh* Another day. Damn lua.
Sun Aug 14, 2011 1:00 am
Mehman
Joined: Tue Nov 17, 2009 7:38 pm Posts: 909 Location: France
Re: UniTec (B25_1.0.0)
If you want a more efficient, simple and less buggy altammo system then try this:
Code:
function Create(self) self.Mags = {}; self.Mags[0] = "Nameyourfirstmag"; self.Mags[1] = "Nameyoursecondmag"; self.TotalMags = 2; --how many different mags
self.AmmoKey = 37; --the key used to change mags
self.Mag = 0; end
function Update(self) self.Parent = MovableMan:GetMOFromID(self.RootID); if MovableMan:IsActor(self.Parent) and ToActor(self.Parent):IsPlayerControlled() and UInputMan:KeyPressed(self.AmmoKey) then if self.Mag < self.TotalMags-1 then self.Mag = self.Mag+1; else self.Mag = 0; end end self:SetNextMagazineName(self.Mags[self.Mag]); end
The user simply presses the preset key and reloads to change ammo.
This will allow every gun to change ammo independantly. Edit: this script should be attached to the gun. Now that we have scripts on attachable we don't need hacky unreliable buggy tricks anymore (no offense, I used them too).
Hmm, although great for most guns, this does bring up a problem with my automatic rifles, who should be more accurate and have a greater viewing range when selecting burst fire. Bah, why is life never easy.
Sun Aug 14, 2011 4:10 pm
Mehman
Joined: Tue Nov 17, 2009 7:38 pm Posts: 909 Location: France
Re: UniTec (B25_1.0.0)
You can have different accuracies for different ammo by making the ammo AEmitters that emmit the bullets, that way you can control the spread of the emitter to make the same gun shoot two different ammo with two different accuracies, different rates of fire are also easily doable if you want.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum