View unanswered posts | View active topics It is currently Mon Dec 30, 2024 9:50 pm



Reply to topic  [ 13 posts ] 
 Making a bomb fire homing(or dumb) missiles? 
Author Message
User avatar

Joined: Sat Jul 10, 2010 5:19 pm
Posts: 543
Reply with quote
Post 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


Wed Feb 09, 2011 7:02 pm
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Tue May 25, 2010 8:27 pm
Posts: 4521
Location: Constant motion
Reply with quote
Post 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?


Wed Feb 09, 2011 7:17 pm
Profile
User avatar

Joined: Sat Jul 10, 2010 5:19 pm
Posts: 543
Reply with quote
Post 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.


Wed Feb 09, 2011 7:22 pm
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Tue May 25, 2010 8:27 pm
Posts: 4521
Location: Constant motion
Reply with quote
Post 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.


Wed Feb 09, 2011 7:27 pm
Profile
User avatar

Joined: Sat Jul 10, 2010 5:19 pm
Posts: 543
Reply with quote
Post 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?


Wed Feb 09, 2011 8:16 pm
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post 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.


Wed Feb 09, 2011 8:23 pm
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Tue May 25, 2010 8:27 pm
Posts: 4521
Location: Constant motion
Reply with quote
Post Re: Making a bomb fire homing(or dumb) missiles?
MOSRotatings have lifetimes on them too.


Wed Feb 09, 2011 8:40 pm
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post Re: Making a bomb fire homing(or dumb) missiles?
And after the lifetime they gib or simply dissapear?


Wed Feb 09, 2011 8:50 pm
Profile
Forum Moderator
User avatar

Joined: Fri Feb 02, 2007 3:53 pm
Posts: 1896
Location: in my little gay bunker
Reply with quote
Post 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.


Wed Feb 09, 2011 10:11 pm
Profile
User avatar

Joined: Sat Jul 10, 2010 5:19 pm
Posts: 543
Reply with quote
Post 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
Fri Feb 11, 2011 6:19 am
Profile
User avatar

Joined: Fri Feb 16, 2007 8:43 pm
Posts: 1695
Location: AH SHIT FUCK AUGH
Reply with quote
Post 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!


Fri Feb 11, 2011 2:47 pm
Profile WWW
User avatar

Joined: Fri Apr 30, 2010 2:12 pm
Posts: 560
Reply with quote
Post Re: Making a bomb fire homing(or dumb) missiles?
Isn't this another AAL marine missile launcher?


Sun Feb 20, 2011 6:50 am
Profile
User avatar

Joined: Sat Jul 10, 2010 5:19 pm
Posts: 543
Reply with quote
Post Re: Making a bomb fire homing(or dumb) missiles?
Thanks for all the helpfulness everyone! Hopefully get this working sometime soon.


Mon Feb 21, 2011 6:11 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 13 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.032s | 14 Queries | GZIP : Off ]