Author |
Message |
Asklar
Data Realms Elite
Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
|
How do I make a missile explode in mid-air?
I am creating a Flare gun, and I don't know much about AEmiters and such, so I created a flare gun using as a template the coalition's rocket launcher.
Until now it works perfect, the only thing I need to do is making the flare gib in mid-air.
Thanks.
|
Mon Jan 31, 2011 6:54 am |
|
|
ludsoe
Joined: Tue Jan 18, 2011 7:50 am Posts: 170 Location: 2 Miles underground on some planet in a vault.
|
Re: How do I make a missile explode in mid-air?
Asklar wrote: I am creating a Flare gun, and I don't know much about AEmiters and such, so I created a flare gun using as a template the coalition's rocket launcher.
Until now it works perfect, the only thing I need to do is making the flare gib in mid-air.
Thanks. My guess is using lua with a create(self) and a wait(5) then gib(self) Although im not sure the wait() is even a CC lua thing. Here it is in code format Code: Create(self) Wait(5) Gib(self) end Im not much of a good scripter.
|
Mon Jan 31, 2011 7:08 am |
|
|
Asklar
Data Realms Elite
Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
|
Re: How do I make a missile explode in mid-air?
So the only way to do it is via lua?
|
Mon Jan 31, 2011 7:12 am |
|
|
ludsoe
Joined: Tue Jan 18, 2011 7:50 am Posts: 170 Location: 2 Miles underground on some planet in a vault.
|
Re: How do I make a missile explode in mid-air?
Asklar wrote: So the only way to do it is via lua? That I know of. Ask whitty he does a bunch of ini stuff, if luas to hard.
|
Mon Jan 31, 2011 7:13 am |
|
|
dragonxp
Joined: Wed Sep 09, 2009 3:16 am Posts: 3032 Location: Somewhere in the universe
|
Re: How do I make a missile explode in mid-air?
You could do it by Lua or use a TDExplosive which has the variable TriggerDelay and just attach an AEmitter on that for the rocket which isn't really very convenient or anything.
|
Mon Jan 31, 2011 7:18 am |
|
|
CaveCricket48
Joined: Tue Jun 12, 2007 11:52 pm Posts: 13144 Location: Here
|
Re: How do I make a missile explode in mid-air?
Several methods of doing this. 1. Have the gun fire a TDExplosive with an attached emitter. The TDExplosive can be invisible and the emitter create whatever effects you need. 2. Have an emitter only. Use StartTimeMS to time the emission of a particle that will cause the emitter to gib itself. Make sure PushesEmitter is 1, and the suicide particle has high mass and the emitter has low GibImpulse Limit. 3. Lua. Code: function Create(self) self.explodeTimer = Timer(); end function Update(self) if self.explodeTimer:IsPastSimMS(5000) then self:GibThis(); end end
|
Mon Jan 31, 2011 7:24 am |
|
|
Asklar
Data Realms Elite
Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
|
Re: How do I make a missile explode in mid-air?
That means that I should use as a template a grenade launcher rather than a rocket launcher?
|
Mon Jan 31, 2011 7:28 am |
|
|
dragonxp
Joined: Wed Sep 09, 2009 3:16 am Posts: 3032 Location: Somewhere in the universe
|
Re: How do I make a missile explode in mid-air?
Asklar wrote: That means that I should use as a template a grenade launcher rather than a rocket launcher? Not really, since you've already got everything ready, i recommend you use CC48's script.
|
Mon Jan 31, 2011 7:29 am |
|
|
CaveCricket48
Joined: Tue Jun 12, 2007 11:52 pm Posts: 13144 Location: Here
|
Re: How do I make a missile explode in mid-air?
Asklar wrote: That means that I should use as a template a grenade launcher rather than a rocket launcher? You could, yes. dragonxp wrote: Not really, since you've already got everything ready, i recommend you use CC48's script. Doing things on your own gives you more experience.
|
Mon Jan 31, 2011 7:30 am |
|
|
dragonxp
Joined: Wed Sep 09, 2009 3:16 am Posts: 3032 Location: Somewhere in the universe
|
Re: How do I make a missile explode in mid-air?
CaveCricket48 wrote: dragonxp wrote: Not really, since you've already got everything ready, i recommend you use CC48's script. Doing things on your own gives you more experience. The truth. However, i wouldn't like to undo work either.
|
Mon Jan 31, 2011 7:32 am |
|
|
Asklar
Data Realms Elite
Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
|
Re: How do I make a missile explode in mid-air?
I know what I'll do! I'll change only the AddAmmo = AEmitter to an AddAmmo = TDExplosive. Later I'll use the flare as a hand-usable flare.
After I finish this, I just need to learn enough lua to make this flares into spot-markers-for-artillery-strikes.
Edit: Question. How do I attach an AEmitter into the TDExplosive?
|
Mon Jan 31, 2011 7:33 am |
|
|
411570N3
Joined: Wed Jan 07, 2009 10:26 am Posts: 4074 Location: That quaint little British colony down south
|
Re: How do I make a missile explode in mid-air?
They are barely different. Either is fine.
|
Mon Jan 31, 2011 7:36 am |
|
|
CaveCricket48
Joined: Tue Jun 12, 2007 11:52 pm Posts: 13144 Location: Here
|
Re: How do I make a missile explode in mid-air?
Asklar: Code: AddEmitter = AEmitter CopyOf = <Emmitter PresetName>
|
Mon Jan 31, 2011 7:38 am |
|
|
Asklar
Data Realms Elite
Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
|
Re: How do I make a missile explode in mid-air?
CaveCricket48 wrote: Asklar: Code: AddEmitter = AEmitter CopyOf = <Emmitter PresetName>
That answer made me feel like a noob. Thanks!
|
Mon Jan 31, 2011 7:42 am |
|
|
Asklar
Data Realms Elite
Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
|
Re: How do I make a missile explode in mid-air?
Hey, I got a doubt. If I want to make a gib that creates the effect of the lit flare, how would I create that gib? It would go like: AddGib = Gib GibParticle = AEmitter PresetName = FlareGib Mass = 0.5 HitsMOs = 0 GetsHitByMOs = 0 SpriteFile = ContentFile ContentFile = Bla/Bla/Bla.bmp AddEmission = Emission EmitedParticle = MOPixel PresetName = Light Thingy Mass = 0.01 HitsMOs = 0 GetsHitByMOs = 0 ScreenEffect = ContentFile FilePath = BLA.rte/Devices/YellowSmall.bmp Color = Color R = 255 G = 0 B = 255 Atom = Atom Material = Material CopyOf = Air TrailColor = Color R = 255 G = 0 B = 255 TrailLength = 3 ParticlesPerMinute = 180 BurstSize = 1 Spread = 3 MaxVelocity = 5 MinVelocity = 1 PushesEmitter = 0
Is this ok? What else does it need?
|
Mon Jan 31, 2011 8:03 am |
|
|
|