View unanswered posts | View active topics It is currently Sat Dec 28, 2024 4:24 pm



Reply to topic  [ 57 posts ]  Go to page Previous  1, 2, 3, 4
 Dual Weapon Mode Template *Pie 
Author Message
User avatar

Joined: Wed Jul 06, 2011 5:11 pm
Posts: 226
Reply with quote
Post Re: Dual Weapon Mode Template *Pie
Any 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
Profile
User avatar

Joined: Tue Apr 01, 2008 4:49 pm
Posts: 1972
Location: The Netherlands
Reply with quote
Post Re: Dual Weapon Mode Template *Pie
If 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
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: Dual Weapon Mode Template *Pie
Psst, 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
Profile YIM WWW
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post Re: Dual Weapon Mode Template *Pie
Carriontrooper, 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
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: Dual Weapon Mode Template *Pie
Nonono, 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
Profile YIM WWW
Data Realms Elite
Data Realms Elite
User avatar

Joined: Fri Jan 07, 2011 8:01 am
Posts: 6211
Location: In your office, earning your salary.
Reply with quote
Post Re: Dual Weapon Mode Template *Pie
Aahhh, now I get it!
Sorry, I'm used to skip some words when reading.


Fri Oct 14, 2011 7:51 pm
Profile
User avatar

Joined: Mon Feb 18, 2008 12:51 am
Posts: 105
Location: A ninja never reveals their location...
Reply with quote
Post Re: Dual Weapon Mode Template *Pie
So 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
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: Dual Weapon Mode Template *Pie
Ew, 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
Profile
User avatar

Joined: Mon Feb 18, 2008 12:51 am
Posts: 105
Location: A ninja never reveals their location...
Reply with quote
Post Re: Dual Weapon Mode Template *Pie
You 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
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: Dual Weapon Mode Template *Pie
Spoiler: I made the vanilla weapons with custom pie slices.


Sat Nov 05, 2011 6:53 pm
Profile
User avatar

Joined: Mon Feb 18, 2008 12:51 am
Posts: 105
Location: A ninja never reveals their location...
Reply with quote
Post Re: Dual Weapon Mode Template *Pie
Really? 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
Profile

Joined: Mon Dec 05, 2011 9:52 pm
Posts: 1
Location: Antigua and Barbuda
Reply with quote
Post Dual Weapon Mode Template Pie
Im 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
Profile ICQ WWW
Display posts from previous:  Sort by  
Reply to topic   [ 57 posts ]  Go to page Previous  1, 2, 3, 4

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