Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Weapon hud change help

Author
Message
starmind 001
FPSC Reloaded Backer
17
Years of Service
User Offline
Joined: 23rd Sep 2007
Location:
Posted: 8th Oct 2009 06:25
I am working on my game alien nostromo and I want to be able to give the illusion of a scolling weapon hud. If you have ever played avp2 you will know what I am talking about. I know I can just use ply's mod or project blue, but I want to make x9 do it on it's own. I have been trying to get it to work for a week now and no cigar. I asked ply for some help on this and he said use "plrfiredweapon=myweaponhere" command and it would work. Apparently not for me. So, I thought maybe someone out there could give it go. What I was going for was if the player selected slot=1 it would show the weapon hud at a certian point on the screen like hudy=80, hudx=5 something like that. Then when player selected say slot=3 hud would be hudy=90, hudx=5 and so on and so forth. I'm sure you get the picture now, if not here's an avp2 pic.


I want the look and feel of this game to be much different than the run of the mill fpsc game.I'm afraind that my scripting knowledge is limited and I could use the help.

My second thought is to do it all in the setuplevel script.Help would be nice ,but not required.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 8th Oct 2009 07:30
For a moment, I thought that was a pic of your game.

Well, this is going to be difficult unless the player gets their weapons in a specific order. FPSC doesn't put an order to the player's weapons, as you know, so having the correct HUD come up in the proper slot is what's going to make this a problem.

The other problem you're going to face, without using Mod features, is when the player uses the mousewheel to select their weapon. Normally you can run a keyboard check for if the number keys were pressed and swap HUDs like that, but without a Mod, you can't detect the mousewheel movement.


The one and only,


starmind 001
FPSC Reloaded Backer
17
Years of Service
User Offline
Joined: 23rd Sep 2007
Location:
Posted: 8th Oct 2009 08:18
Quote: "I thought that was a pic of your game"
I wish.

My weapons I want in a specific order in which the player will start out with and also finish the game three to four weapons. I think if we did a script for no mod x9 first for those like me, and the one for each mod out there. I only say that, because everything that I use to make my game will be released at the end for free to help those who need it mod or not. Please note I am not asking for a hand out if I must pay for the script I will. Ply you gave me a point in the right direction with your email and thank you, but it was not what I was going for. Your help is always welcomed. I was looking at some of conjured's script to if maybe I could used say multiple objects in level to detect the weapon scroll, but it will have to wait until morning. You see I am one of those people if you show me how then I can do it, modify it, whatever from that point on. I look at the hints and tips docs before even trying to ask a question on here not to mention I do do alittle r&d before also.

Ok it's time for bed, but how do you detect the mouse buttons without the mod and with the mod?

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 8th Oct 2009 13:16 Edited at: 8th Oct 2009 13:30
My help will always be here for those who will accept it.

Quote: "how do you detect the mouse buttons without the mod and with the mod?"


Without Mod: You don't.

With Mod: Depends on the Mod. I have practically NO knowledge of Mod commands other than my own, so all of this is for Ply's Mod/Project Blue.
Detect Mouse Button Click:
mouseclick=X
Left Mouse button = 1, Right Mouse button = 2, Middle Mouse button = 4... add up the ones you're looking to detect at the same time.
Example: For both left and right buttons being pressed 'mouseclick=3' (1+2=3). For both left and middle buttons being pressed 'mouseclick=5' (1+4=5). For just the right button being pressed 'mouseclick=2'.

Detect Mouse Wheel Scrolling:
This is actually a combination of a few Ply's Mod features. It mainly relies upon the internal variable system and the variable recognition system which allows you to use variables in any command.
Checking for upward scroll:
vargreater=$MMZ 0.001
Checking for downward scroll:
varless=$MMZ -0.001


Hope that shed some more light on the subject.


[EDIT]

Just wanted to pop back in real quick and mention that detecting a weapon swap will never be as accurate as detecting the weapon being held.
You can determine what weapon the player is holding with the following command:
haveweap=X
X can be 1 (to detect if the player is holding any weapon), 0 (to detect if the player is not holding any weapons), or (and this gets a tad confusing for the first time) you may give it the name of a weapon to detect if the player is holding that specific weapon. Here is an example: haveweap=scifi/tavor
Notice that I included the weapon's parent directory in the name as well as the weapon's folder name. You can find these folder names directly inside of the "Files/gamecore/guns" folder.

I think you will find it much easier to detect the weapon being used directly as opposed to attempting to track when weapon changes are made.
Also, the "haveweap" command is for Ply's Mod/Project Blue only, just like the other commands I've listed here.

[/EDIT]


The one and only,


Cyborg ART
17
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden - Sthlm
Posted: 8th Oct 2009 18:25
Simple effect of scrolling weapons:


Pros:
-Isnt affected by which order player picks up weapons.
-Requires no scripting knowledge
-Only have to change the hud_icon.dds in gamecore/guns

Cons:
-Wont show ammo next to the weapon, you will have to put the ammofield somewere else.


You dont have to thank me

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 8th Oct 2009 23:41
Did you forget to attach a script to your post, Cyborg Art? If not, I think I'm missing the purpose of your post.


The one and only,


Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 9th Oct 2009 01:48
Quote: "Pros:
-Isnt affected by which order player picks up weapons.
-Requires no scripting knowledge
-Only have to change the hud_icon.dds in gamecore/guns

Cons:
-Wont show ammo next to the weapon, you will have to put the ammofield somewere else.


You dont have to thank me "


That is a rather good idea.

Quote: "Did you forget to attach a script to your post, Cyborg Art? If not, I think I'm missing the purpose of your post.


The one and only,"


He means to make the weapons image huds that come up when you have that weapon out look like



Cyborg ART
17
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden - Sthlm
Posted: 9th Oct 2009 10:33
Quote: "Did you forget to attach a script to your post, Cyborg Art? If not, I think I'm missing the purpose of your post.


The one and only,
"


You dont have to be a scripter to solve stuff

Quote: "That is a rather good idea."

Thank you

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 9th Oct 2009 10:55
Ahhh! I get it now! You're right, that was rather closed minded of me.

Now all you have to do is make sure they're all picked up in the right order.


The one and only,


Cyborg ART
17
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden - Sthlm
Posted: 9th Oct 2009 11:22
Well you could have:

1 = Melee weapons (Having several weapons under #1)
2 = Secondary (Having several weapons under #2)
3 = Primary (Having several weapons under #3)
4 = Special (Having several weapons under #4)

Something like Halflife 2, but much cooler

Tell if I should explain it more deeply.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 9th Oct 2009 23:46
I don't know about you, but if i saw that setup, I would expect to be able to press 1 constantly to swap between all of the melee weapons.


The one and only,


Cyborg ART
17
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden - Sthlm
Posted: 10th Oct 2009 11:09 Edited at: 10th Oct 2009 11:10
Quote: "I don't know about you, but if i saw that setup, I would expect to be able to press 1 constantly to swap between all of the melee weapons.


The one and only,"


I get your point. Its now where scripters continue the work

But I guess that wont be possible without a mod, right? Maybe not even with a mod

Maybe something for your mod?



Scrolls trough weapon 1,2 and 3 when key "x" is pressed.

And if this dont exist (for gunspec):


Assigns the weapon to slot "x"


And when we still are about changeing weapons:



When "x" is pressed it will "quickswap" between slot 1 and 5 if one of them is selected (for grenadelaunchers etc)




Samuellx3
17
Years of Service
User Offline
Joined: 19th Jan 2007
Location: Caaaardiff!
Posted: 23rd Oct 2009 00:13
Slap me if im wrong, but can't you assign slots for weapons regardless of when you pick them up at the build game menu?

~ ViRaL =]

Login to post a reply

Server time is: 2024-11-25 08:04:47
Your offset time is: 2024-11-25 08:04:47