| Author | Message | 
        
			| war_man333 
					Joined: Sun Nov 11, 2007 1:49 pm
 Posts: 785
   |   Re: Ballistic Weapons: Mercenaries! ))AAL Discussion411570N3 wrote: -A deployable sentry gunI've always wanted this.
 
 | 
		
			| Tue Apr 28, 2009 2:13 pm | 
					
					   | 
	
	
		|  | 
	
			| Disst 
					Joined: Thu Feb 12, 2009 1:47 am
 Posts: 1182
   |   Re: Ballistic Weapons: Mercenaries! ))AAL DiscussionA grenade perhaps? 
 
 | 
		
			| Tue Apr 28, 2009 2:16 pm | 
					
					   | 
	
	
		|  | 
	
			| piipu 
					Joined: Mon Jun 30, 2008 9:13 pm
 Posts: 499
 Location: Finland
   |   Re: Ballistic Weapons: Mercenaries! ))AAL Discussionnumgun wrote: -Plasma trailer grenadeHow about a grenade that gibs into those plasma balls that home in on any actors that they are facing and blow up or do some stuff like that when they touch something. Also a shield thing that instead of actual protection would cause all MOPixels to steer away from the user would be cool. I think I could code both pretty easily, although the shield thing will need some lag limiting stuff to it.
 
 | 
		
			| Tue Apr 28, 2009 2:46 pm | 
					
					   | 
	
	
		|  | 
	
			| war_man333 
					Joined: Sun Nov 11, 2007 1:49 pm
 Posts: 785
   |   Re: Ballistic Weapons: Mercenaries! ))AAL Discussionpiipu wrote: numgun wrote: -Plasma trailer grenadeHow about a grenade that gibs into those plasma balls that home in on any actors that they are facing  and blow up or do some stuff like that when they touch something. Also a shield thing that instead of actual protection would cause all MOPixels to steer away from the user would be cool. I think I could code both pretty easily, although the shield thing will need some lag limiting stuff to it.Maybe rather home in on actors that they are close to, homing in on actors they face would suck.
 
 | 
		
			| Tue Apr 28, 2009 3:03 pm | 
					
					   | 
	
	
		|  | 
	
			| numgun 
					Joined: Sat Jan 13, 2007 11:04 pm
 Posts: 2932
   |   Re: Ballistic Weapons: Mercenaries! ))AAL Discussionpiipu wrote: numgun wrote: -Plasma trailer grenadeHow about a grenade that gibs into those plasma balls that home in on any actors that they are facing and blow up or do some stuff like that when they touch something. Also a shield thing that instead of actual protection would cause all MOPixels to steer away from the user would be cool. I think I could code both pretty easily, although the shield thing will need some lag limiting stuff to it.A homing plasma balls grenade would be cool indeed. They wouldnt explode but do some scary ♥♥♥♥ to them with emitters. It would also allow them to attack multiple targets. Also that repeller thing sounds interesting. How would it work and whats that about the lag youre talking about?
 
 | 
		
			| Tue Apr 28, 2009 3:32 pm | 
					
					   | 
	
	
		|  | 
	
			| war_man333 
					Joined: Sun Nov 11, 2007 1:49 pm
 Posts: 785
   |   Re: Ballistic Weapons: Mercenaries! ))AAL DiscussionI'm thinking that maybe it can emit some air particles that slow down the incoming particles. 
 
 | 
		
			| Tue Apr 28, 2009 3:48 pm | 
					
					   | 
	
	
		|  | 
	
			| piipu 
					Joined: Mon Jun 30, 2008 9:13 pm
 Posts: 499
 Location: Finland
   |   Re: Ballistic Weapons: Mercenaries! ))AAL DiscussionI'd just lua all MOPixels with some negative gravity, or if that's too laggy, cause a constant acceleration away from the device. But it would be active even when dropped so that might suck a bit. 
 
 | 
		
			| Tue Apr 28, 2009 3:56 pm | 
					
					   | 
	
	
		|  | 
	
			| piipu 
					Joined: Mon Jun 30, 2008 9:13 pm
 Posts: 499
 Location: Finland
   |   Re: Ballistic Weapons: Mercenaries! ))AAL DiscussionPlasma thingy: Code: function Create(self)end
 
 function Destroy(self)
 end
 
 function Update(self)
 for actor in MovableMan.Actors do
 local diff = math.sqrt(math.pow((actor.Pos.X-self.Pos.X),2) + math.pow((actor.Pos.Y - self.Pos.Y),2))
 if diff < 30 then
 diff = 30
 end
 if diff < 300 then
 local diffx = actor.Pos.X - self.Pos.X
 local diffy = actor.Pos.Y - self.Pos.Y
 local ang2 = math.atan2(self.Vel.Y , self.Vel.X)
 local ang = math.atan2(diffy , diffx)
 if math.abs(ang - ang2) < 0.7 then
 self.Vel.Y = -(actor.Vel.Y - (50 / diff * math.sin(ang)))
 self.Vel.X = -(actor.Vel.X - (100 / diff * math.cos(ang)))
 end
 end
 end
 end
Shield thingy: Code: function Create(self)end
 
 function Destroy(self)
 end
 
 function Update(self)
 
 for actor in MovableMan.Particles do
 if (actor.ClassName == "MOPixel") and (actor.HitsMOs == 1) and ( not(actor.PresetName == "nameofjetpackparticlehere"))  --not sure about ClassName, ask TLB if this doesn't work. Prevents lag by not gravitating undangerous junk.
 local diff = math.sqrt(math.pow((actor.Pos.X-self.Pos.X),2) + math.pow((actor.Pos.Y - self.Pos.Y),2))
 if diff < 50 then  -- the smaller the value the sharper the bullets turn when they are close
 diff = 50
 end
 if diff < 200 then    --maximum range
 local gravitymultiplier = 25  -- use this to adjust gravity to a fitting value
 local diffx = actor.Pos.X - self.Pos.X
 local diffy = actor.Pos.Y - self.Pos.Y
 local ang = math.atan2(diffy,diffx)
 actor.Vel.Y = -(actor.Vel.Y - ((gravitymultiplier / math.pow(diff,2)) * math.sin(ang)))
 actor.Vel.X = -(actor.Vel.X - ((gravitymultiplier / math.pow(diff,2)) * math.cos(ang)))
 end
 end
 end
 end
There's propably a few typos again. Added some comments to the shield so you can tweak it to not to be too strong. Edit: whoops, doublepost. Fixed a typo in the shield also. Edit2: fixed the plasmathingy.
 
 | 
		
			| Tue Apr 28, 2009 4:31 pm | 
					
					   | 
	
	
		|  | 
	
			| numgun 
					Joined: Sat Jan 13, 2007 11:04 pm
 Posts: 2932
   |   Re: Ballistic Weapons: Mercenaries! ))AAL DiscussionYou just increased the amount of bombs in BW by 2! I'll go sprite and code these right away!   
 
 | 
		
			| Wed Apr 29, 2009 8:24 am | 
					
					   | 
	
	
		|  | 
	
			| Geti 
					Joined: Sun Jul 13, 2008 9:57 am
 Posts: 4886
 Location: some compy
   |   Re: Ballistic Weapons: Mercenaries! ))AAL Discussionyou might also want to include MOSParticles in the shield repulsion thing, what with shrapnel and fire and whatnot. 
 
 | 
		
			| Wed Apr 29, 2009 8:57 am | 
					
					     | 
	
	
		|  | 
	
			| numgun 
					Joined: Sat Jan 13, 2007 11:04 pm
 Posts: 2932
   |   Re: Ballistic Weapons: Mercenaries! ))AAL DiscussionYeah, it would work better if it would affect items and particles MOSParticles and Emitters and MOSR that are not pinned., but not actors. It would be like a dynamic bubbleshield.
 Also I realized since Piipu came up with something cool as a repeller device, it sort of renders the reverse field that just sends them back where they came from instantly. Both of them are the same thing, except Piipu's is much more cooler. I hope if wont turn out too laggy, but if its will and its unbearable, I'll just turn it into the reverse field device I just mentioned.
 
 Edit: What does "diff" stand for in your code, Piipu? Difference in range or something? Just curious.
 
 EditEDIT: I'm taking the code to the Lua section, I posted the latest codes, but neither of them work. : (
 
 
 | 
		
			| Wed Apr 29, 2009 10:33 am | 
					
					   | 
	
	
		|  | 
	
			| 411570N3 
					Joined: Wed Jan 07, 2009 10:26 am
 Posts: 4074
 Location: That quaint little British colony down south
   |   Re: Ballistic Weapons: Mercenaries! ))AAL DiscussionHey wait, that'd also increase the power of gunfire when firing from inside the thing... schweet! 
 
 | 
		
			| Wed Apr 29, 2009 11:48 am | 
					
					     | 
	
	
		|  | 
	
			| numgun 
					Joined: Sat Jan 13, 2007 11:04 pm
 Posts: 2932
   |   Re: Ballistic Weapons: Mercenaries! ))AAL Discussion411570N3 wrote: Hey wait, that'd also increase the power of gunfire when firing from inside the thing... schweet!Not as much as the accelerator device, but yes it would. I'd be interesting to see if this could protect you from a nuke blast... Hmm... Piipu's code just gave me an idea. Right now I wanted the accelerator to increase mass as well as velocity, but the problem is that loose terrain particles became even more powerful and soon I had cool vertical holes in my map. Not what I intended but now I know how to fix it. Thanks again Piipu!   
 
 | 
		
			| Wed Apr 29, 2009 12:21 pm | 
					
					   | 
	
	
		|  | 
	
			| 411570N3 
					Joined: Wed Jan 07, 2009 10:26 am
 Posts: 4074
 Location: That quaint little British colony down south
   |   Re: Ballistic Weapons: Mercenaries! ))AAL DiscussionHey wait, the code piipu posted... would it gradually slow down and reverse the particles or just instantly send them packing? From my rudimentary knowledge of Lua it appears that the particles would instantly be sent away to me.... Hmmmm, going to have to learn more Lua before I can concretely say anything...I'd personally prefer gradual slowing down than instant rebounding...
 Hmmm.... I'm not actually sure...
 
 
 | 
		
			| Wed Apr 29, 2009 12:29 pm | 
					
					     | 
	
	
		|  | 
	
			| piipu 
					Joined: Mon Jun 30, 2008 9:13 pm
 Posts: 499
 Location: Finland
   |   Re: Ballistic Weapons: Mercenaries! ))AAL DiscussionIt's that slowing down thing. diff is the distance between the things that are gravitated. I made the plasma thing compatible with my luaguns scene and tried it there and it worked. I must have done something to the code then. 
 
 | 
		
			| Wed Apr 29, 2009 1:23 pm | 
					
					   | 
	
	
		|  | 
	
	
		|  |