Data Realms Fan Forums http://45.55.195.193/ |
|
How would I bind two keys to lower/increase a value in CC. http://45.55.195.193/viewtopic.php?f=73&t=14691 |
Page 1 of 1 |
Author: | Erahgon [ Sat May 16, 2009 9:56 pm ] |
Post subject: | How would I bind two keys to lower/increase a value in CC. |
For example Code: AddAmmo = AEmitter PresetName = Particle Vortex2 Mass = 0.01 HitsMOs = 0 GetsHitByMOs = 0 LifeTime = 250 SpriteFile = ContentFile FilePath = luaguns.rte/Guns/vortex.bmp FrameCount = 1 SpriteOffset = Vector X = -5 Y = -5 AtomGroup = AtomGroup AutoGenerate = 1 Material = Material CopyOf = Bullet Metal Resolution = 2 Depth = 0 DeepCheck = 0 AddEmission = Emission EmittedParticle = AEmitter CopyOf = Particle Vortex ParticlesPerMinute = 240 BurstSize = 1 Spread = 3.1 MaxVelocity = 0 MinVelocity = 0 PushesEmitter = 0 EmissionEnabled = 1 EmissionsIgnoreThis = 0 I want to be able to use two keys to lower and increase the LifeTime value. I don't know too much about lua but I assume it's possible now. (And yes I'm trying to modify the vortex gun for my own amusement). |
Author: | mail2345 [ Sat May 16, 2009 11:05 pm ] |
Post subject: | Re: How would I bind two keys to lower/increase a value in CC. |
Try: [code] function Create(self) lifetimechange = 42, or whatever end function Update(self) if UInputMan:KeyPressed == ("I") then self.Lifetime + lifetimechange end if UInputMan:KeyPressed == ("D") then self.Lifetime - lifetimechange end end function Destroy(self) end |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |