Data Realms Fan Forums
http://45.55.195.193/

Making a bomb fire homing(or dumb) missiles?
http://45.55.195.193/viewtopic.php?f=1&t=21450
Page 1 of 1

Author:  Glowsticks [ Wed Feb 09, 2011 7:02 pm ]
Post subject:  Making a bomb fire homing(or dumb) missiles?

Alrighty, well I want to make a grenade launcher that fires projectile A. into the air which then splits in half and fires 6 miniature projectile B missiles after a certain distance ( akin to the Jericho in Abdul's Air support)...

How does one go about doing this? Is it possible without LUA? If not then what sort of script do I need ( Never touched LUA in my life.)

EX: Image

Author:  Roast Veg [ Wed Feb 09, 2011 7:17 pm ]
Post subject:  Re: Making a bomb fire homing(or dumb) missiles?

Surely it can't be much more difficult than making them the gibs of the big missile?

Author:  Glowsticks [ Wed Feb 09, 2011 7:22 pm ]
Post subject:  Re: Making a bomb fire homing(or dumb) missiles?

Thats the basic principal yes, but I have no idea How to go about doing that.

Author:  Roast Veg [ Wed Feb 09, 2011 7:27 pm ]
Post subject:  Re: Making a bomb fire homing(or dumb) missiles?

Code:
AddEffect = MOSRotating
    PresetName = <<Here's an MOSRotating I made earlier.>>
    <<Variables = Values>>

AddEffect = MOSRotating
    PresetName = <<Here's a missile I'm making now.>>
    <<Variables = Values>>
    AddGib = MOSRotating
        CopyOf = <<Here's an MOSRotating I made earlier.>>

Then bung the missile into your magazine.

Author:  Glowsticks [ Wed Feb 09, 2011 8:16 pm ]
Post subject:  Re: Making a bomb fire homing(or dumb) missiles?

Would that split in the air? I thought I would need an Lua script to make something Gib before impact?

Author:  Asklar [ Wed Feb 09, 2011 8:23 pm ]
Post subject:  Re: Making a bomb fire homing(or dumb) missiles?

I think that the only way to make something gib in mid-air is via lua (I think, unless the missile is a TDExplosive).
You have to make a lua script, that would go like:
Code:
function Create(self)
   self.MidAirGib = Timer()
 end
function Update(self)
   if self.MidAirGib:IsPastSimMS(1500) then -- Put the time in miliseconds in the brackets
      self.GibThis()
   end
end


It would be something like that.

Author:  Roast Veg [ Wed Feb 09, 2011 8:40 pm ]
Post subject:  Re: Making a bomb fire homing(or dumb) missiles?

MOSRotatings have lifetimes on them too.

Author:  Asklar [ Wed Feb 09, 2011 8:50 pm ]
Post subject:  Re: Making a bomb fire homing(or dumb) missiles?

And after the lifetime they gib or simply dissapear?

Author:  p3lb0x [ Wed Feb 09, 2011 10:11 pm ]
Post subject:  Re: Making a bomb fire homing(or dumb) missiles?

Last time I checked, they simply disappear. I usually use the AEmitter detonation method. Basically you attach an AEmitter and have it emit a very heavy particle after a few milliseconds. Be sure to use the variable that makes the emission push the AEmitter.

Author:  Glowsticks [ Fri Feb 11, 2011 6:19 am ]
Post subject:  Re: Making a bomb fire homing(or dumb) missiles?

First off I'd like to thank everyone for the help/responses. However I am ridiculously confused with this at the moment, and have attached my ammo code for You all to take a look at. I'm not asking you guys to code anything for me here, mind you, But comments denoting what I need to do would be wonderful. Learning experience and all that.

Attachments:
Alligator.ini [3.1 KiB]
Downloaded 198 times

Author:  Shook [ Fri Feb 11, 2011 2:47 pm ]
Post subject:  Re: Making a bomb fire homing(or dumb) missiles?

MOSRotatings don't do emissions, AEmitters do. You can safely change AddAmmo = MOSRotating to AddAmmo = AEmitter, since AEmitters are basically MOSRotatings that can emit stuff. Also, you need to remove the tab on that line. It's the basis for the entire object, so it should be at the "bottom". As for the gib part, just go AddGib = Gib every time. The object definition is on the next line, and should correspond with the type of object you're gibbing. Obviously, the name in CopyOf should be identical to what you're emitting, else you won't be emitting... Well, that. Also, it's very likely crashing at EmissionAngle, since that variable is related to emitters, and you've (currently) defined an MOSRotating.
Also, might i suggest making ParticlesPerMinute in your heavy emission much higher? Something like 3600 should be optimal, since it's equal to one emission per frame. Since the emitter breaks, you don't have to worry about it flooding everything.

Hope it helps!

Author:  Naxete [ Sun Feb 20, 2011 6:50 am ]
Post subject:  Re: Making a bomb fire homing(or dumb) missiles?

Isn't this another AAL marine missile launcher?

Author:  Glowsticks [ Mon Feb 21, 2011 6:11 am ]
Post subject:  Re: Making a bomb fire homing(or dumb) missiles?

Thanks for all the helpfulness everyone! Hopefully get this working sometime soon.

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