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
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[i] 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[i] 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 } }
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
Last Edit: October 03, 2016, 04:55:18 pm by ALIA999
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
Double Post Merge: October 03, 2016, 04:55:18 pm
between my personal life and modding i dont really have much time to help single people, if you need help with stuff you should make a post here http://ugx-mods.com/forum/index.php/board,11.0.html theres lots of people around that most likely can help, just keep in mind it could take a bit for someone to respond
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 } }
hat_ee2() { flag_wait( "all_players_connected" ); helmet2 = GetEnt( "helmet2", "targetname" ); helmet2_ta = GetEnt( helmet2.target, "targetname" ); helmet2_ta hide(); helmet2 SetCursorHint( "HINT_NOICON" ); helmet2 UseTriggerRequireLookAt(); kills = 150; //kills required, feel free to edit players = get_players(); for (i = 0; i < players.size; i++) players[i] 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[i] playsound("laugh_child"); //play a sound to notify upon completion helmet2_ta show(); helmet2 SetHintString( "Hold &&1 To Take" ); //the trigger will say this while(1) { helmet2 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 } }
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
hat_ee2() { flag_wait( "all_players_connected" ); helmet2 = GetEnt( "helmet2", "targetname" ); helmet2_ta = GetEnt( helmet2.target, "targetname" ); helmet2_ta hide(); helmet2 SetCursorHint( "HINT_NOICON" ); helmet2 UseTriggerRequireLookAt(); kills = 150; //kills required, feel free to edit players = get_players(); for (i = 0; i < players.size; i++) players[i] 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[i] playsound("laugh_child"); //play a sound to notify upon completion helmet2_ta show(); helmet2 SetHintString( "Hold &&1 To Take" ); //the trigger will say this while(1) { helmet2 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 } }
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
hat_ee2() { flag_wait( "all_players_connected" ); helmet2 = GetEnt( "helmet2", "targetname" ); helmet2_ta = GetEnt( helmet2.target, "targetname" ); helmet2_ta hide(); helmet2 SetCursorHint( "HINT_NOICON" ); helmet2 UseTriggerRequireLookAt(); kills = 150; //kills required, feel free to edit players = get_players(); for (i = 0; i < players.size; i++) players[i] 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[i] playsound("laugh_child"); //play a sound to notify upon completion helmet2_ta show(); helmet2 SetHintString( "Hold &&1 To Take" ); //the trigger will say this while(1) { helmet2 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 } }
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
Last Edit: November 30, 2016, 02:38:54 pm by AdvancedDecay
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.