Call of Duty 5: World at War => Tutorial Desk => Scripting => Topic started by: death_reaper0 on October 03, 2016, 08:59:44 am
Title: REVELATIONS HAT/MASK
Post by: death_reaper0 on October 03, 2016, 08:59:44 am
this is a small tutorial for a revelations styled mask/hat for waw, keep in mind this is just an example, however it is fully functional and should work in your map. this one is just from a testing one ive made that will require 150 total kills (among all players, not just a single player) and will give 40% damage reduction, this is i think 2 extra hits with jugg and posibly one without (i use a 3 hit without jugg system so i haven't checked)
anyway first you need to go into radiant and find the "hat" you wish to use, this needs to be a "char_..." model that is some kind of hat or helmet, for this example im going to use "char_usa_marine_wet_helm1" so if yours is different you will need to change that whenever that shows up during this tutorial.
create a script model with the model you wish to use (right click 2d view in radiant > script > model)
now make a trigger use (right click 2d view in radiant > trigger > trigger_use) and press N on the keyboard to bring up the KVP's, make the key: "targetname" and value: "helmet1" (without the ")
with the trigger still selected, select the helmet you chose and press W to link them, there should be a red line connecting them now. place wherever you want it to be, save and we're done in radiant
heres an example of how it should look (https://www.ugx-mods.com/forum/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FEePJiGY.jpg&hash=428e21d5e85816a3e48103eacef7e23fd64dd298)
now open up your mapname.gsc and place under
then at the bottom of the file place this
now we go into your _zombiemode.gsc and find the function in that find and under it place remember to change the helmet if you changed it before!
before (https://www.ugx-mods.com/forum/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FslzxB7h.jpg&hash=e24cb25aaa76be09d5d0811b142aa5002842683c) after (https://www.ugx-mods.com/forum/proxy.php?request=http%3A%2F%2Fi.imgur.com%2F1XtyQmD.jpg&hash=20d03d24ba7b294fee3aaeb911ce7c1eaffd61d6) other players should see it too
that should be everything, no need to precache or load the model in mod.csv since its a scriptmodel
as i said before this was my test one, for full quests you will have to script things youself
please credit if used
Title: Re: REVELATIONS HAT/MASK
Post by: ALIA999 on October 03, 2016, 02:41:07 pm
you are the best dude im making a map his name is daemons mine i wont some help with secripting coues idont every thing with scripting i just want some help with some things
you are the best dude im making a map his name is daemons mine i want some help with secripting coues idont know every thing with scripting i just want some help with some things
Title: Re: REVELATIONS HAT/MASK
Post by: death_reaper0 on October 03, 2016, 05:11:08 pm
you are the best dude im making a map his name is daemons mine i wont some help with secripting coues idont every thing with scripting i just want some help with some things
hat_ee() { flag_wait( "all_players_connected" ); helmet1 = GetEnt( "helmet1", "targetname" ); helmet1_ta = GetEnt( helmet1.target, "targetname" ); helmet1_ta hide(); helmet1 SetCursorHint( "HINT_NOICON" ); helmet1 UseTriggerRequireLookAt(); kills = 150; //kills required, feel free to edit players = get_players(); for (i = 0; i < players.size; i++) players thread mask_kills_tracker(); while(kills > 0) { level waittill("got_a_mask_kill"); kills -=1; } players = get_players(); for (i = 0; i < players.size; i++) players playsound("laugh_child"); //play a sound to notify upon completion helmet1_ta show(); helmet1 SetHintString( "Hold &&1 To Take" ); //the trigger will say this while(1) { helmet1 waittill( "trigger", user ); if (isdefined(user.hatModel)) user detach( user.hatModel, "" ); user.hatModel = "char_usa_marine_wet_helm1"; //this is the helmet model, should match the one in radiant user attach(user.hatModel); user iprintlnbold("+40 Percent Resistance To All Damage"); //says this when picked up } }
To something like:
Quote
helmet1 SetHintString( "Hold &&1 To Take" ); //the trigger will say this while(1) { helmet1 waittill( "trigger", user ); if (isdefined(user.hatModel)) user detach( user.hatModel, "" ); user.hatModel = "char_usa_marine_wet_helm1"; //this is the helmet model, should match the one in radiant user attach(user.hatModel); user iprintlnbold("+40 Percent Resistance To All Damage"); //says this when picked up } }
Thanks again!
Title: Re: REVELATIONS HAT/MASK
Post by: AdvancedDecay on November 30, 2016, 03:10:19 am
hello Reaper..... can I ask how I would have as many as I wanted of these as I cant get it to work
Double Post Merge: November 30, 2016, 03:13:43 am can u pm me please I need some major help with this script
Title: Re: REVELATIONS HAT/MASK
Post by: death_reaper0 on November 30, 2016, 03:37:11 am
this is pretty much the same, unlocked the same and gives the same hat, you will need to script your own way of unlocking, change the hat and effect, to make more just copy + paste and change all the "2"s to "3" dont have the free time to script in more so you'll have to do them yourself
Title: Re: REVELATIONS HAT/MASK
Post by: AdvancedDecay on November 30, 2016, 12:49:10 pm
this is pretty much the same, unlocked the same and gives the same hat, you will need to script your own way of unlocking, change the hat and effect, to make more just copy + paste and change all the "2"s to "3" dont have the free time to script in more so you'll have to do them yourself
can I juss change the kills to 250 for unlocking as u said I need to script a way of unlocking but cant I juss change the kills and it work
this is pretty much the same, unlocked the same and gives the same hat, you will need to script your own way of unlocking, change the hat and effect, to make more just copy + paste and change all the "2"s to "3" dont have the free time to script in more so you'll have to do them yourself
hey how do I edit this " if(isdefined(self.hatModel) && self.hatModel == "char_usa_raider_helm2") finalDamage = int(finalDamage*0.12); "
so that instead of a extra hit it gives me longer sprint duration
Title: Re: REVELATIONS HAT/MASK
Post by: IamTIMMEHHH on December 13, 2016, 04:30:31 pm
can you add multiple of these an if its possible how?
Title: Re: REVELATIONS HAT/MASK
Post by: ColdShrimp2 on May 24, 2017, 10:10:59 pm
This is a little late, but how do I make the reward be zombies ignore you on random occasions?
Title: Re: REVELATIONS HAT/MASK
Post by: Centric on May 25, 2017, 06:48:29 pm
This is a little late, but how do I make the reward be zombies ignore you on random occasions?
Create a zombie point of interest when you don't want the zombies attacking and just delete it when you want them to attack again. The scripting reference should have documentation on it.
Title: Re: REVELATIONS HAT/MASK
Post by: ColdShrimp2 on May 29, 2017, 06:55:32 pm
I want the reward to be that it gives a perk, I edited it and got this: