View Single Post
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 09-16-2008 , 02:16   Re: Nade Modes (Nomexous) v6.0b
Reply With Quote #104

Quote:
Originally Posted by Nomexous View Post
Wow. My baby has really grow up. I glanced at the code, and I have to say, ot_207, good job being able to read my code. I'm especially impressed that you figured out how to do the menus. I'm officially passing the torch on to you, and you deserve it.

Now, let me make one more contribution. I have two new, unreleased grenade modes. One is a homing mode, and the other is a rocket mode. I've attached the source code (still labeled version 3.1) so you can see how to implement them.

In homing mode, I detect when a player throws a grenade. Using TraceToss, I calculate where the grenade will land. Then, I use FindEntityInSphere to select the closest target. Each "think," the grenade will check if the target is in line of sight. If it is, it will seek the target. So, if you know there might be someone around the corner, don't bother bouncing the grenade. Just lob it, and it will curve around to the target once it reaches the corner.

ot_207, you might want to change the seek strength. It's a bit strong right now.

Rocket mode is supposed to be used in open areas. Again, I detect when a player throws the rocket grenade. Using TraceToss, I calculate where it will land, and store the location. Each "think" I check to see whether or not the grenade is falling or not by checking the sinage of the velocity in the Z-axis. If it's negative, meaning its passed the apogee of its flight, it'll shoot in a straight path at very high speed towards the location previously stored. This means the grenade should hit the same spot that it would if it were just a regular grenade.

As soon as the grenade is propelled, it is changed to an impact grenade. Unfortunately, because the velocity is a magnitude of 3000, it'll actually bounce off the target and get a good distance away before it explodes. This has to do with the time between thinks. It's pretty scary, though. ot_207, you might want to dress the rocket grenades up a little, too. Change the angles so the grenade's pointing towards the target, and draw a sprite and play a sound to make it look and sound like a rocket igniting.

Well, there you go! I'll return once in a while to check out the improvements you make to this. I'm busy with college, but who knows, I might return to the world of AMXX. Have fun!

PS. Will you take over Weapon Physics and Lie Flat too? Weapon Physics really needs some love and attention.
Well I have to say that I'm honored ^^.
I will do my best trying to make this plugin grow, will try to implement the new modes with the improvements you asked about.
This is the plugin that I wanted with my server for a long time and I thought why not improve it and post it on the amxx forums.
And about Lie Flat or Weapon Physics, don't know ... maybe in the future, I'm starting colage over 2 weeks (the first year).

PS. I hope that you will return one day to the world of AMXX, your programming skills are great!
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.

Last edited by ot_207; 09-16-2008 at 02:19.
ot_207 is offline