Hey guys!
Firstly, let me introduce the project I've been working on for about a day or so. Crazy Hats! Basically, what this mutator does is allow the player to select one of several wacky, ridiculous hats to wear and frag zombies in. It's just a small thing that adds immense fun and hilarity (as well as uniquity) to the standard gameplay.
I'm basically working off of the SantaHats mutator from UT2004 (which was ported over to KF in SinngerG's Roll The Dice mutator). What I did was simply begin churning out 3D models of silly hats, and then I modified the mutator code to support the new additions.
Basically, I have an "if" statement running, where if(Hat == 1){ and then it attaches Hat #1. I've implemented three hats this way, using "else if" statements and such, and they are all driven by the int "Hat". For the time being, I've simply forced the value of "Hat" through the source code to test all the different hats out...
However, an important aspect of the code is not working for me at all, and that is the ability to manipulate a variable (client side) that sets which hat is available (by allowing a user to input a value for "Hat"). I have no idea how to go about doing this, because I don't know what class to extend in order to have this work.
What I'm basically thinking of is a console-based option, where the user opens their console, and types something like:
SetHat 1
And they are given the particular hat.
From what I gather, this is handled as an "exec function" but after multiple attempts to get this function to work properly, I've failed...
Can anyone help me understand how to go about this particular problem? Even better, would someone be willing to assist me with the programming side of this? All I need is a basic framework that I can add new hats to...
Here's some screens of my progress:
Santa Hat (this was the default, not something I made)
Stovepipe Hat
Sombrero
I'm making a bunch of other hats, such as:
- Baseball Cap
- Pope Hat
- Giant 'Fro
- Bunny Ears
- Cat Ears
- Devil Horns
- Halo
- Robot Antenna
And even more! I'm also up for suggestions, however, none of this matters unless I can resolve this code/someone helps me script.
Thanks in advance for any help!
EDIT: Also, I'm hoping that this has whitelist potential, mainly because it's not affecting anything truly critical to the gameplay, it's simply a visual tweak. If a dev can verify this for me, that'd be phenomenal and I'll happily continue working on this!
DOUBLE EDIT: I've also been looking at the Roll The Dice mutator's structure, in how it pulls information from the Chat Window in order to function (i.e. you say "!rtd" and the mutator activates). I'm considering going down this route in order to solve my dilemma... Some verification/experience doing this from other programmers would be much appreciated.
Firstly, let me introduce the project I've been working on for about a day or so. Crazy Hats! Basically, what this mutator does is allow the player to select one of several wacky, ridiculous hats to wear and frag zombies in. It's just a small thing that adds immense fun and hilarity (as well as uniquity) to the standard gameplay.
I'm basically working off of the SantaHats mutator from UT2004 (which was ported over to KF in SinngerG's Roll The Dice mutator). What I did was simply begin churning out 3D models of silly hats, and then I modified the mutator code to support the new additions.
Basically, I have an "if" statement running, where if(Hat == 1){ and then it attaches Hat #1. I've implemented three hats this way, using "else if" statements and such, and they are all driven by the int "Hat". For the time being, I've simply forced the value of "Hat" through the source code to test all the different hats out...
However, an important aspect of the code is not working for me at all, and that is the ability to manipulate a variable (client side) that sets which hat is available (by allowing a user to input a value for "Hat"). I have no idea how to go about doing this, because I don't know what class to extend in order to have this work.
What I'm basically thinking of is a console-based option, where the user opens their console, and types something like:
SetHat 1
And they are given the particular hat.
From what I gather, this is handled as an "exec function" but after multiple attempts to get this function to work properly, I've failed...
Can anyone help me understand how to go about this particular problem? Even better, would someone be willing to assist me with the programming side of this? All I need is a basic framework that I can add new hats to...
Here's some screens of my progress:
Santa Hat (this was the default, not something I made)
Stovepipe Hat
Sombrero
I'm making a bunch of other hats, such as:
- Baseball Cap
- Pope Hat
- Giant 'Fro
- Bunny Ears
- Cat Ears
- Devil Horns
- Halo
- Robot Antenna
And even more! I'm also up for suggestions, however, none of this matters unless I can resolve this code/someone helps me script.
Thanks in advance for any help!
EDIT: Also, I'm hoping that this has whitelist potential, mainly because it's not affecting anything truly critical to the gameplay, it's simply a visual tweak. If a dev can verify this for me, that'd be phenomenal and I'll happily continue working on this!
DOUBLE EDIT: I've also been looking at the Roll The Dice mutator's structure, in how it pulls information from the Chat Window in order to function (i.e. you say "!rtd" and the mutator activates). I'm considering going down this route in order to solve my dilemma... Some verification/experience doing this from other programmers would be much appreciated.
Last edited: