This script allows you to add suits/player models you can grab off the wall, and take them off or swap them around. This does not come with models, or go over how to get viewmodels, or other models into your map, or how to rig player models. The body model used must be rigged for the player. The script has options to set view models and alternative huds per suit.
Included is instructions, script, and 4 different suit prefabs, with the player zombie models used as placeholders.
If you want to give a suit a feature, you can check player.suit var for the suit the player has on. For example, before doing damage to the player, add if(player.suit!="suit0") .... meaning this would only continue if they didn't have that suit on. Hit me up with any questions.
v1.1 - added functions for each suit v1.2 - added a function for taking off suits, for normal suit added character files you may need to use this script when setting model back to normal and taking off the suit. If you use different models than the default ones, make sure you edit them per character.
Last Edit: July 18, 2016, 03:55:26 pm by MakeCents
If you want scripts / features made for you, then contact me by PM or email / skype etc it will cost you tho so if you have no intention of reciprocating don't even waste my time
Well, I'm making a mod maybe, so I've been cleaning up and taking the "orbit" out of these scripts, so to speak. Everything will be shared when/if I release the mod, so I figured I would share them in the mean time, and fix any bugs that may get reported, and maybe someone would have new ideas, that I could make easier to incorporate then. Win win.
I envy your ability to script so well. I could see myself doing something cool with a hazmat suit and a hud for an EE. Excellent work! +1
Lol, thank you sir. I already have like 3 or more ideas on how to improve this script with added vars to the arrays for functions to run after switching suits, and a few more isolated functions, and a better suit/viewarm showing function and ... lol.
I look forward to seeing what custom things you create with it!
Last Edit: June 24, 2016, 02:34:14 pm by MakeCents
This script allows you to add suits/player models you can grab off the wall, and take them off or swap them around. This does not come with models, or go over how to get viewmodels, or other models into your map, or how to rig player models. The body model used must be rigged for the player. The script has options to set view models and alternative huds per suit.
Included is instructions, script, and 4 different suit prefabs, with the player zombie models used as placeholders.
If you want to give a suit a feature, you can check player.suit var for the suit the player has on. For example, before doing damage to the player, add if(player.suit!="suit0") .... meaning this would only continue if they didn't have that suit on. Hit me up with any questions.
I keep getting a bad syntax error when I says what view hands and model I want It doesnt like the that line of code but I could be doing something wrong
I keep getting a bad syntax error when I says what view hands and model I want It doesnt like the that line of code but I could be doing something wrong
I keep getting a bad syntax error when I says what view hands and model I want It doesnt like the that line of code but I could be doing something wrong
What Scobalula said.
And I can also send you a new script if you want, where I modified how you setup the viewmodels and hud, which may be easier. Now its just one line per type of suit instead of multiple, and I added functions that get called when you put the suit on, and tweaked some things.
Last Edit: June 27, 2016, 01:48:45 pm by MakeCents
And I can also send you a new script if you want, where I modified how you setup the viewmodels and hud, which may be easier. Now its just one line per type of suit instead of multiple, and I added functions that get called when you put the suit on, and tweaked some things.
Okay just send me the newer version as its probably better to use that version
Okay just send me the newer version as its probably better to use that version
Alright, I should be able to tonight. Its probably a simple fix though if you just post what you added in the script or maybe how its being called or something like that. Syntax errors are pretty easy. And the new script doesn't work any differently really, just listing vars horizontally in a call to a function instead of vertically populated the array.
Last Edit: June 28, 2016, 04:00:01 pm by MakeCents
Alright, I should be able to tonight. Its probably a simple fix though if you just post what you added in the script or maybe how its being called or something like that. Syntax errors are pretty easy. And the new script doesn't work any differently really, just listing vars horizontally in a call to a function instead of vertically populated the array.
Edit: also, you only need to do one suit type. I gave 4 possibly different types of suits in prefabs, and I can see how that could be confusing, but you can copy just the suit0 prefab 3 more times and don't need to do anything to suits 1, 2, or 3 unless your adding more types of suits.
In the video I use three of each prefab, suit0, suit1, suit2 and suit3, each three times. Each suit# represents a type of suit.
So edit a prefab for the suit, like spacesuit, suit0, if you make another suit type like the gas mask guy, suit1, another type like halo, suit2 and so on. Then copy the prefabs in radiant (select and press space) as many times as you like.
//1st suit type level.suits["suit0"]=[]; level.suits["suit0"]["viewarms"] = "viewmodel_zom_pressure_suit_arms"; level.suits["suit0"]["hud"] = undefined;//The shader for this suit
Edit: also, you only need to do one suit. I gave 4 possibly different suits in prefabs, and I can see how that could be confusing, but you can copy just the suit0 prefab 3 more times and don't need to do anything to suits 1, 2, or 3 unless your adding more types of suits.
So spacesuit, suit0, if you make another suit type like the gas mask guy, suit1, another type like halo, suit2 and so on. Then copy the prefabs as many times as you like.