Data Realms Fan Forums
http://45.55.195.193/

Animated Magazine while firing
http://45.55.195.193/viewtopic.php?f=73&t=46207
Page 1 of 1

Author:  Magmacow358 [ Fri Sep 15, 2017 4:50 am ]
Post subject:  Animated Magazine while firing

I'm trying to set up a gun that has a magazine that cycles between two frames while firing. In the past, I've had magazines that change frame depending on the ammo left, so I know magazine frames can at least be changed in realtime.

I tried this to change the frame after every shot, the idea being that it's one frame on odds and the other frame on evens. Put on the magazine itself

Code:
function Update(self)

         if self.RoundCount % 2 == 0 then
            self.Frame = 0
         else
            self.Frame = 1
         end

end


It does nothing. It doesn't even output errors in the console, on initialization or when the gun is active.

Author:  Magmacow358 [ Fri Sep 15, 2017 4:54 am ]
Post subject:  Re: Animated Magazine while firing

Of course. It just works now even though I changed nothing.

uh, nevermind then I guess.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/