| Author | 
            Message | 
        
        
			| 
				
				 4zK 
				
				
					 Joined: Mon Oct 11, 2010 1:15 pm Posts: 594 Location: Finlandia
				 
				 
			 | 
			
				
				  Melee Weapons  
					
						Has anybody come up with any sort of good melee weapon script? Swords that spray sharp pixels with lousy animations are kinda dull.
  One of my favorites is The Perfect Fireman Axe from TLB's Axe Cop mod, as it cuts heads nicely, with a proper animation.
  Could one come up with a script for a weapon, that would work as a held device rather than a gun, and attacking by aiming up and down (manually), as if swinging? Is there a way to make, for example, the tip of an axe emit pixels / cause damage depending on how fast it is moving / swinging, rather than adding an emitter that just destroys everything by pointing with it? 
					
  
			 | 
		
		
			| Thu May 17, 2012 8:14 pm | 
			
				
					 
					
					 
				  
			 | 
    	
		
	
	
		  | 
	
	
			| 
				
				 Asklar 
				Data Realms Elite 
				
					 Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
				 
				 
			 | 
			
				
				  Re: Melee Weapons  
					
						The sword of the mod AAL worked kinda like that.
  You held the left mouse button and the sword would activate, and you could swing it for a realist kind of attack. What's cool about it is that it's like the only weapon that works like that and it is completely coded in ini. 
					
  
			 | 
		
		
			| Fri May 18, 2012 9:49 pm | 
			
				
					 
					
					 
				  
			 | 
    	
		
	
	
		  | 
	
	
			| 
				
				 4zK 
				
				
					 Joined: Mon Oct 11, 2010 1:15 pm Posts: 594 Location: Finlandia
				 
				 
			 | 
			
				
				  Re: Melee Weapons  
					
						That would be a simple way to make one, but I was looking for something that required actual *swinging*, by aiming up and down and so. The AAL sword can just rape through enemies by just pointing it at them and pressing the left mouse button. You can though swing it if you want for the aesthetic effect. If there was a way of determining up and down aiming speed in scripts, it would solve a lot, if everything.
  The AI probably wouldn't be able to use one, but still. 
					
  
			 | 
		
		
			| Fri May 18, 2012 10:30 pm | 
			
				
					 
					
					 
				  
			 | 
    	
		
	
	
		  | 
	
	
			| 
				
				 Asklar 
				Data Realms Elite 
				
					 Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
				 
				 
			 | 
			
				
				  Re: Melee Weapons  
					
						Well, I think that checking the speed of the sword wouldn't be very accurate, instead, making the weapon check if the actor changed it's AimAngle, and everytime the AimAngle changes, many invisible particles are created on the blade. 
					
  
			 | 
		
		
			| Fri May 18, 2012 10:34 pm | 
			
				
					 
					
					 
				  
			 | 
    	
		
	
	
		  | 
	
	
			| 
				
				 4zK 
				
				
					 Joined: Mon Oct 11, 2010 1:15 pm Posts: 594 Location: Finlandia
				 
				 
			 | 
			
				
				  Re: Melee Weapons  
					
						That's sort of what I was trying to do. I'll try to tinker with the lua a bit and see what I can do.
  Thx for the help! 
					
  
			 | 
		
		
			| Sat May 19, 2012 9:25 am | 
			
				
					 
					
					 
				  
			 | 
    	
		
	
	
		  | 
	
	
			| 
				
				 Lizardheim 
				DRL Developer 
				
					 Joined: Fri May 15, 2009 10:29 am Posts: 4107 Location: Russia
				 
				 
			 | 
			
				
				  Re: Melee Weapons  
					
						Guess you could have the blade emit more particles the faster it's moving.
  I'm not a Lua wizard, so I don't quite know how that would be done, but we do have attachable scripting now so it should be highly possible. 
					
  
			 | 
		
		
			| Sat May 19, 2012 1:05 pm | 
			
				
					 
					
					 
				  
			 | 
    	
		
	
	
		  | 
	
	
			| 
				
				 Benpasko 
				
				
					 Joined: Sun Aug 09, 2009 9:26 am Posts: 1633
				 
				 
			 | 
			
				
				  Re: Melee Weapons  
					
						The HF Blade in Ballistic Weapons Mercs functions like this. It drops 0 speed particles that inherit velocity, so the faster you move or swing it, the more damage it does. 
					
  
			 | 
		
		
			| Sun May 20, 2012 5:30 am | 
			
				
					 
					
					 
				  
			 | 
    	
		
	
	
		  | 
	
	
			| 
				
				 Asklar 
				Data Realms Elite 
				
					 Joined: Fri Jan 07, 2011 8:01 am Posts: 6211 Location: In your office, earning your salary.
				 
				 
			 | 
			
				
				  Re: Melee Weapons  
					
						Yes, it doesn't matter how much you know or how good at lua you are, sometimes with enough creativity you can do it with ini. 
					
  
			 | 
		
		
			| Sun May 20, 2012 6:29 am | 
			
				
					 
					
					 
				  
			 | 
    	
		
	
	
		  | 
	
	
	
		 |