View unanswered posts | View active topics It is currently Sat Apr 19, 2025 2:29 am



Reply to topic  [ 725 posts ]  Go to page Previous  1 ... 11, 12, 13, 14, 15, 16, 17 ... 49  Next
 Hueg Pack o' Mods *Final update!??!* 
Author Message
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: My huge pack of mods, which is back. *Update: June 6th '09*
Also I just came up with that function based on wikipedia so it may/may not work perfectly, but overall it does work well.


Sun Jun 07, 2009 3: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: My huge pack of mods, which is back. *Update: June 6th '09*
It works perfectly when firing horizontally, but it gets all wonky when the shot is angled, as in, the frequency increases. I think it needs to call for the overall velocity instead of X-velocity, if it is to be used at an angle.
Here's some screens to show you how it looks like right now:

Without Lua Frequency can be adjusted.

Image

With Lua, horizontally

Image

With Lua, diagonally

Image

As you can see, the horizontal Lua wave looks far better than the non-Lua wave, but it looks wonky when fired diagonally. Note: I divided the amplitude (as provided by Mind) of Grif's script by 10, else it would make HUGE waves, that hammered into the ground instantly.
I don't know if it's possible to make the Lua wave usable at an angle, but i'm certain that my hacky method works at any angle... But it doesn't look as smooth.


Sun Jun 07, 2009 12:20 pm
Profile WWW
Loose Canon
User avatar

Joined: Sun Mar 29, 2009 11:07 pm
Posts: 2992
Location: --------------->
Reply with quote
Post Re: My huge pack of mods, which is back. *Update: June 6th '09*
Better than nothing, Shook.


Sun Jun 07, 2009 5:30 pm
Profile WWW
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: My huge pack of mods, which is back. *Update: June 6th '09*
I hate to do this to you, Shook (since it's going to be jargon) but you could run a proximity check to determine the parent, then if the aim angle is above a certain level it'll decrease the amplitude, or raise the wavenumber.

Basically, the function I posted has most of the arguments from the wikipedia page on sine waves. So, uh, learn from those terms and figure it out.

ALTERNATELY oh wait no--well, what you could do is, for the last argument in the sinewave function (self.Pos.X) replace it with:

self.Pos.X - self.Pos.X / 2

That should still get you a good wave, but less energetically overall.

Lemme go test some different things here.


Sun Jun 07, 2009 5:53 pm
Profile

Joined: Sat Feb 03, 2007 7:11 pm
Posts: 1496
Reply with quote
Post Re: My huge pack of mods, which is back. *Update: June 6th '09*
Off topic from Sine waves, and such, Beware the Zero Division Cannon:

Image


Sun Jun 07, 2009 6:02 pm
Profile WWW
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: My huge pack of mods, which is back. *Update: June 6th '09*
ah - ha!

Some indie devs helped shed light on sine waves. Functional code in any direction (except sometimes straight up):

To decrease frequency (how many waves per second aka the distance between wave tops) simply set the 20 to something else that's higher. Wavenumber can be just about anything, angvel the same, and phase has to be self.pos.x or at least based on that. And then, as mind explained, amplitude is the height of the wave.

Code:
function Create(self)
    function sinewave(amplitude,wavenumber,angvel,phase)
        return amplitude * math.sin(wavenumber - angvel + phase / 20);
    end
   self.initialy = self.Pos.Y;
   self.timer1 = Timer();
end

function Update(self)
   if self.timer1:IsPastRealMS(10) == true then
      self.Pos.Y = self.initialy + sinewave(40,1,math.pi / 2,self.Pos.X);
      self.timer1:Reset();
   end
end


Sun Jun 07, 2009 6:12 pm
Profile
User avatar

Joined: Fri Feb 16, 2007 8:43 pm
Posts: 1695
Location: AH SHIT FUCK AUGH
Reply with quote
Post Re: My huge pack of mods, which is back. *Update: June 6th '09*
Nice, it works like a charm! Thanks Grif. :)
I'm starting to think that the fact that it can only fire horizontally might just be a quirk with the weapon, kind of like how the Exterminator in the Pelian Army has an erratic flight path. To compensate, it can be deliciously powerful...


Sun Jun 07, 2009 8:41 pm
Profile WWW
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: My huge pack of mods, which is back. *Update: June 6th '09*
To fix the fact that it goes for a little while and then goes onto the sine path you can remove the timer lines:

Code:
function Create(self)
    function sinewave(amplitude,wavenumber,angvel,phase)
        return amplitude * math.sin(wavenumber - angvel + phase / 20);
    end
   self.initialy = self.Pos.Y;
end

function Update(self)
      self.Pos.Y = self.initialy + sinewave(40,1,math.pi / 2,self.Pos.X);
end


Sun Jun 07, 2009 8:47 pm
Profile
Loose Canon
User avatar

Joined: Sun Mar 29, 2009 11:07 pm
Posts: 2992
Location: --------------->
Reply with quote
Post Re: My huge pack of mods, which is back. *Update: June 6th '09*
zalo wrote:
Off topic from Sine waves, and such, Beware the Zero Division Cannon:

Hyperkultra wrote:
RaggedDruid wrote:
Oh god, try using the gravity modifier from the Lua telekinesis thingy and shooting a Zero Division cannon at it, then throwing it with a push.

Epic win.

Ok, I'm gonna try that using a Zero Division cannon that I modified to not have the lagtastic fireballs, but still has all the punch. It actually helps alot.

EDIT: Hmm. Well. That didn't work. The ZD Cannon worked once, I managed to grab the blast, then I dropped it on myself, and CC crashed when I try to restart the match. Subsequent tries resulted in the cannon backfiring and raping the map. Needless to say, they were all failures. It was pretty laggy, but not unbearably so when I managed to grab the blast. But I suppose I have a monster of a machine, so... yeah. Anyone else care to try?

Yes, we've been over this. Fun isn't it?


Sun Jun 07, 2009 9:25 pm
Profile WWW
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: My huge pack of mods, which is back. *Update: June 6th '09*
Just for fun, a sawtooth weapon function:

Code:
function Create(self)
    function sinewave(amplitude,wavenumber,angvel,phase)
        return amplitude * math.sin(wavenumber - angvel + phase / 30);
    end
   
   function sawtooth(x,range,slope)
      return (x % range) * slope
   end

   self.initialy = self.Pos.Y - 20;
end

function Update(self)
   --self.Pos.Y = self.initialy + sinewave(30,1,math.pi,self.Pos.X);
   self.Pos.Y = self.initialy + sawtooth(self.Pos.X,100,0.5);
end


Sun Jun 07, 2009 9:53 pm
Profile
User avatar

Joined: Mon Apr 13, 2009 12:27 pm
Posts: 813
Location: Yogyakarta, Indonesia. A slice o' paradise.
Reply with quote
Post Re: My huge pack of mods, which is back. *Update: June 6th '09*
Hmmm... on sine waves, how about making the gun shoot a zero-gravity, constant speed invisible particle, but then have the invisible particle be trailed by an oscillating, visible and destructive AEmitter? So, if you 'hold' the invisible particle in place all you see is the AEmitter going up and down. And since the invisible particle will automatically align with where you aim the gun (I mean the angle), you'd have a sine wave which aligns with the angle you point the gun at. To fix frequency you'd just have to adjust the speed at which it oscillates. How's this? The oscillating part could be made into a lua file or something...


Mon Jun 08, 2009 11:56 am
Profile YIM WWW
User avatar

Joined: Fri Feb 16, 2007 8:43 pm
Posts: 1695
Location: AH SHIT FUCK AUGH
Reply with quote
Post Re: My huge pack of mods, which is back. *Update: June 6th '09*
I'm pretty sure that this is impossible to do with conventional coding, and quite complicated to do with Lua. So for now, it stays how it is (as in, with Grif's neat-o script applied), so nobody will have to break their brains on it. =P

There's just one thing i've been thinking about... Would it be possible to make the Drones' guns controllable with Lua? Just like, make them fire when either the users Fire button is pressed, or when a pre-mapped key is pressed. It's probably not possible to make the attached emitter shoot, considering the lack of control over attachables, but wouldn't it be possible to make the drone itself spawn the shot and effects?
I also just thought about if it would be possible to make the drones flip horizontally, when flying backwards. Just so they don't actually fly backwards, y'know?
Well this wasn't nearly as subtle as i hoped it would be. >.>

Edit: Shooting problem solved, thanks to Grif. :D


Tue Jun 09, 2009 7:20 pm
Profile WWW
User avatar

Joined: Fri Feb 16, 2007 8:43 pm
Posts: 1695
Location: AH SHIT FUCK AUGH
Reply with quote
Post Re: My huge pack of mods, which is back. *Update: June 6th '09*
*Double post lel* (I wish i didn't have to, but ehh... Needs a bump, this)

This is like, a progress update for your convenience.

Firstly, the old drones have been upgraded with manual firing and such, thanks to Grif. They all work very nicely, according to both me and my beta tester, Ragdollmaster.

Secondly, i've added the Death Drone, which kills anyone dumb enough to get too close.

Thirdly, i'm in the progress of making heavy versions of all the drones.

Image

Huzzah.


Fri Jun 12, 2009 3:04 pm
Profile WWW
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post Re: My huge pack of mods, which is back. *Update: June 6th '09*
Shook wrote:
Huzzah.

Shook, let it never be said that you ever let me down.


Fri Jun 12, 2009 3:30 pm
Profile
User avatar

Joined: Fri Feb 16, 2007 8:43 pm
Posts: 1695
Location: AH SHIT FUCK AUGH
Reply with quote
Post Re: My huge pack of mods, which is back. *Update: June 6th '09*
Image

Hoo-hah!

Anyways, i've made almost all of the heavy drones now, but there's one thing i need to ask you guys, provided that any of you can be assed to press the "Reply" button... Should i make heavy digger drones as well? I just feel that they'd be a little redundant, but ehh... If you want, i'll make them.


Sat Jun 13, 2009 5:09 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 725 posts ]  Go to page Previous  1 ... 11, 12, 13, 14, 15, 16, 17 ... 49  Next

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.568s | 14 Queries | GZIP : Off ]