View unanswered posts | View active topics It is currently Thu Jan 02, 2025 6:15 pm



Reply to topic  [ 11 posts ] 
 Firing vertically? 
Author Message
User avatar

Joined: Sun Aug 01, 2010 5:23 am
Posts: 40
Location: Your mom's house
Reply with quote
Post Firing vertically?
I want to make a rocket launcher (currently a copy of the homing missile launcher) that fires the rockets vertically, instead of horizontally.

To make things clearer, here's a picture...

Attachment:
example.bmp [60.8 KiB]
Not downloaded yet


Is there any way to do that? Preferably with .ini


Sat Dec 04, 2010 4:46 am
Profile WWW
User avatar

Joined: Wed Jan 07, 2009 10:26 am
Posts: 4074
Location: That quaint little British colony down south
Reply with quote
Post Re: Firing vertically?
Have the launcher fire a TDExplosive with a GibImpulseLimit of 0. Attach an AEmitter to it that emits heavy, low lifetime, HitsMOs = 0, GetsHitByMOs = 0 particles at a high rate. Have the TDExplosive gib into another TDExplosive offset upwards at a decent speed. The result should be a rocket launcher that fires a rocket perpendicular to your current aim.


Sat Dec 04, 2010 5:18 am
Profile WWW
User avatar

Joined: Sun Aug 01, 2010 5:23 am
Posts: 40
Location: Your mom's house
Reply with quote
Post Re: Firing vertically?
That sounds complex, but I'll try it.
In the meantime, any other suggestions?


Sat Dec 04, 2010 5:24 am
Profile WWW
User avatar

Joined: Wed Jan 07, 2009 10:26 am
Posts: 4074
Location: That quaint little British colony down south
Reply with quote
Post Re: Firing vertically?
It'd be much simpler in Lua, where you could just set the velocity of the rocket on create.


Sat Dec 04, 2010 6:34 am
Profile WWW
User avatar

Joined: Thu Dec 27, 2007 4:08 am
Posts: 590
Location: USA
Reply with quote
Post Re: Firing vertically?
Would you want it to fire directly up no matter which direction you point your gun? Say, 45 degrees up/down?


Sat Dec 04, 2010 7:55 am
Profile
User avatar

Joined: Sun May 30, 2010 5:30 am
Posts: 853
Location: Auckland, NZ
Reply with quote
Post Re: Firing vertically?
Make the launcher fire an AEmitter at 0 velocity and make the AEmitter facing up and have its Emissions perpendicular to the ground with PushesEmitter = 1


Sat Dec 04, 2010 8:17 am
Profile
User avatar

Joined: Sun Aug 01, 2010 5:23 am
Posts: 40
Location: Your mom's house
Reply with quote
Post Re: Firing vertically?
411570N3 wrote:
It'd be much simpler in Lua, where you could just set the velocity of the rocket on create.


I'm not too good with lua, any help?

YHTFLKC wrote:
Would you want it to fire directly up no matter which direction you point your gun? Say, 45 degrees up/down?


It should fire perpendicular to the current aim

Also I need to know how to attach an AEmiiter? (I know, very noobish)


Sat Dec 04, 2010 6:36 pm
Profile WWW
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: Firing vertically?
Code:
function Create(self)
    self.Vel.X = 0
    self.Vel.Y = -20
end


Provided it doesn't explode in your barrel [set the barrel offset slightly further than normal in the ini] it should just go upward.


Sat Dec 04, 2010 6:47 pm
Profile
User avatar

Joined: Sun Aug 01, 2010 5:23 am
Posts: 40
Location: Your mom's house
Reply with quote
Post Re: Firing vertically?
Roast Veg wrote:
Code:
function Create(self)
    self.Vel.X = 0
    self.Vel.Y = -20
end


Provided it doesn't explode in your barrel [set the barrel offset slightly further than normal in the ini] it should just go upward.


It works!
Thanks for the code. Also thanks to everyone else for ideas.

I might publish this in the mod dump soon, just in case you want to use it.


Sat Dec 04, 2010 7:06 pm
Profile WWW
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: Firing vertically?
Scratch that, I've just seen you release this in the Minor Mod Dump, and what I put here would have not helped at all.


Sat Dec 04, 2010 7:22 pm
Profile
User avatar

Joined: Sun Aug 01, 2010 5:23 am
Posts: 40
Location: Your mom's house
Reply with quote
Post Re: Firing vertically?
The mod's out! Check the mod dump if you want to see it, my first mod. Thanks everyone for your help.

I saw your edit, thanks anyway.


Sat Dec 04, 2010 10:46 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 11 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.053s | 14 Queries | GZIP : Off ]