View unanswered posts | View active topics It is currently Thu Dec 26, 2024 6:17 pm



Reply to topic  [ 2 posts ] 
 How would I bind two keys to lower/increase a value in CC. 
Author Message

Joined: Thu Apr 12, 2007 2:53 am
Posts: 83
Reply with quote
Post 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).


Sat May 16, 2009 9:56 pm
Profile WWW
User avatar

Joined: Tue Nov 06, 2007 6:58 am
Posts: 2054
Reply with quote
Post 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


Sat May 16, 2009 11:05 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users


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

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.163s | 13 Queries | GZIP : Off ]