| Author | Message | 
        
			| Pantera1993 
					Joined: Wed Jul 06, 2011 5:11 pm
 Posts: 226
   |   Re: Dual Weapon Mode Template *PieAny idea on when we will know how to implement the Pie menu version? I'm ithchin' to use it!! 
 
 | 
		
			| Mon Oct 10, 2011 1:05 am | 
					
					   | 
	
	
		|  | 
	
			| Gotcha! 
					Joined: Tue Apr 01, 2008 4:49 pm
 Posts: 1972
 Location: The Netherlands
   |   Re: Dual Weapon Mode Template *PieIf you want an example of how it's used with pie menu buttons you can check out UniTec.  
 
 | 
		
			| Mon Oct 10, 2011 7:36 am | 
					
					   | 
	
	
		|  | 
	
			| carriontrooper 
					Joined: Mon Apr 13, 2009 12:27 pm
 Posts: 813
 Location: Yogyakarta, Indonesia. A slice o' paradise.
   |   Re: Dual Weapon Mode Template *PiePsst, here's something for dual wieldable guns: It will change the mags of both FG and BG guns. Code: function MechMissileLauncherRocket(actor)local gun = ToAHuman(actor).EquippedItem;
 for i=1,MovableMan:GetMOIDCount() - 1 do
 part = MovableMan:GetMOFromID(i);
 if part.PresetName == "Multi Launcher" and part.RootID == gun.RootID  then
 local part = ToHDFirearm(part);
 part:SetNextMagazineName("RCKTL Mag");
 part:Reload();
 end
 end
 end
 
 function MechMissileLauncherMissile(actor)
 local gun = ToAHuman(actor).EquippedItem;
 for i=1,MovableMan:GetMOIDCount() - 1 do
 part = MovableMan:GetMOFromID(i);
 if part.PresetName == "Multi Launcher" and part.RootID == gun.RootID  then
 local part = ToHDFirearm(part);
 part:SetNextMagazineName("MSSLL Mag");
 part:Reload();
 end
 end
 end
just change "Multi Launcher" to whatever the gun's name is, and "RCKTL Mag" and "MSSLL Mag" to the respective custom mags.
 
 | 
		
			| Mon Oct 10, 2011 2:04 pm | 
					
					       | 
	
	
		|  | 
	
			| Asklar Data Realms Elite 
					Joined: Fri Jan 07, 2011 8:01 am
 Posts: 6211
 Location: In your office, earning your salary.
   |   Re: Dual Weapon Mode Template *PieCarriontrooper, the line  Code: local gun = ToAHuman(actor).EquippedItem isn't necessary since you use "part" for the weapon. Still, there isn't a problem with leaving that line there.
 
 | 
		
			| Thu Oct 13, 2011 9:18 pm | 
					
					   | 
	
	
		|  | 
	
			| carriontrooper 
					Joined: Mon Apr 13, 2009 12:27 pm
 Posts: 813
 Location: Yogyakarta, Indonesia. A slice o' paradise.
   |   Re: Dual Weapon Mode Template *PieNonono, it must be there. If you look below it, there's this line here:
 if part.PresetName == "Multi Launcher" and part.RootID == gun.RootID  then
 
 it's to ensure both the FG gun and BG gun both change, but only on the actor you select.
 Try removing it, and then get two or more actors dual-wield. Without that line, if one actor changes mags, the others will also change mags.
 
 So, for the sake of clarity:
 'gun' = FG gun which you use the mag change pie menu
 'part' = FG and BG gun
 same RootID = both guns on same actor
 
 
 | 
		
			| Fri Oct 14, 2011 2:49 pm | 
					
					       | 
	
	
		|  | 
	
			| Asklar Data Realms Elite 
					Joined: Fri Jan 07, 2011 8:01 am
 Posts: 6211
 Location: In your office, earning your salary.
   |   Re: Dual Weapon Mode Template *PieAahhh, now I get it!Sorry, I'm used to skip some words when reading.
 
 
 | 
		
			| Fri Oct 14, 2011 7:51 pm | 
					
					   | 
	
	
		|  | 
	
			| Kigali 
					Joined: Mon Feb 18, 2008 12:51 am
 Posts: 105
 Location: A ninja never reveals their location...
   |   Re: Dual Weapon Mode Template *PieSo how would one go about changing the code so that the weapon mode switched on a keypress instead of selecting a section of the pie? Like if I wanted to be able to hit "1" for mode 1 and "2" for mode 2. 
 
 | 
		
			| Sat Oct 29, 2011 9:22 pm | 
					
					   | 
	
	
		|  | 
	
			| CaveCricket48 
					Joined: Tue Jun 12, 2007 11:52 pm
 Posts: 13144
 Location: Here
   |   Re: Dual Weapon Mode Template *PieEw, custom key bindings. Anyways, if you'd want to do that, you'd pretty much have the script that is triggered by the pie button be directly attached to the gun, and be triggered by a key press instead.Mehmen had some done like that , but it's a bit different.
 
 | 
		
			| Sat Oct 29, 2011 10:10 pm | 
					
					   | 
	
	
		|  | 
	
			| Kigali 
					Joined: Mon Feb 18, 2008 12:51 am
 Posts: 105
 Location: A ninja never reveals their location...
   |   Re: Dual Weapon Mode Template *PieYou may be interested in the short code that Grif and Shook made here . It involves making custom pie slices, and it looks fairly simple.
 
 | 
		
			| Sat Nov 05, 2011 4:12 am | 
					
					   | 
	
	
		|  | 
	
			| CaveCricket48 
					Joined: Tue Jun 12, 2007 11:52 pm
 Posts: 13144
 Location: Here
   |   Re: Dual Weapon Mode Template *PieSpoiler: I made the vanilla weapons with custom pie slices. 
 
 | 
		
			| Sat Nov 05, 2011 6:53 pm | 
					
					   | 
	
	
		|  | 
	
			| Kigali 
					Joined: Mon Feb 18, 2008 12:51 am
 Posts: 105
 Location: A ninja never reveals their location...
   |   Re: Dual Weapon Mode Template *PieReally? That's cool. I don't really know who's who (obviously), all I saw was that it was pertinent to your idea. 
 
 | 
		
			| Sat Nov 05, 2011 9:20 pm | 
					
					   | 
	
	
		|  | 
	
			| grusla 
					Joined: Mon Dec 05, 2011 9:52 pm
 Posts: 1
 Location: Antigua and Barbuda
   |   Dual Weapon Mode Template PieIm having the same problem evilledave is having, and ironically I am using the same exact template. Files work in pms, but not posts. They are uploaded, but not displayed in posts. Maybe it is a compatibility issue with this template? Please respond when you get the chance 
 
 | 
		
			| Sun Dec 18, 2011 4:27 am | 
					
					       | 
	
	
		|  | 
	
	
		|  |