UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

REVELATIONS HAT/MASK

broken avatar :(
Created 8 years ago
by death_reaper0
0 Members and 1 Guest are viewing this topic.
9,254 views
broken avatar :(
×
broken avatar :(
Location: aupotato
Date Registered: 27 September 2013
Last active: 3 years ago
Posts
588
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Signature
respect the dead

donates greatly appreciated :) paypal.me/F3ARxReaper666
discord server:
https://discord.gg/tsGHW99
×
death_reaper0's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
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



now open up your mapname.gsc and place
Code Snippet
Plaintext
	level thread hat_ee();
under
Code Snippet
Plaintext
	level thread DLC3_threadCalls2();

then at the bottom of the file place this
Code Snippet
Plaintext
mask_kills_tracker()
{
while(1)
{
self waittill("zom_kill");
level notify ("got_a_mask_kill");
//iprintlnbold("got a kill");
}
}

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
}
}

now we go into your _zombiemode.gsc and find the
Code Snippet
Plaintext
player_damage_override
function
in that find
Code Snippet
Plaintext
	finalDamage = iDamage;
and under it place
Code Snippet
Plaintext
 
if(isdefined(self.hatModel) && self.hatModel == "char_usa_marine_wet_helm1")
finalDamage = int(finalDamage*0.6);
remember to change the helmet if you changed it before!

before

after

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
broken avatar :(
×
broken avatar :(
Location: bd
Date Registered: 12 February 2015
Last active: 2 years ago
Posts
4
Respect
Forum Rank
Fresh Corpse
Primary Group
Member
×
ALIA999's Groups
ALIA999's Contact & Social Links
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
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
broken avatar :(
×
broken avatar :(
Location: aupotato
Date Registered: 27 September 2013
Last active: 3 years ago
Posts
588
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
death_reaper0's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
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
broken avatar :(
×
broken avatar :(
Location: bd
Date Registered: 12 February 2015
Last active: 2 years ago
Posts
4
Respect
Forum Rank
Fresh Corpse
Primary Group
Member
×
ALIA999's Groups
ALIA999's Contact & Social Links
thanks dude
broken avatar :(
×
broken avatar :(
Location: rusiberia
Date Registered: 26 June 2016
Last active: 4 days ago
Posts
155
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Community Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Do I look like a Fcking magician?
Signature
A.K.A IamBEAR
×
IamTIMMEHHH's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
IamTIMMEHHH's Contact & Social LinksIamTIMMEHHH#IamBEAR
Is this with the new ugx standalone???
broken avatar :(
×
broken avatar :(
Location: rusiberia
Date Registered: 26 June 2016
Last active: 4 days ago
Posts
155
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Community Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Do I look like a Fcking magician?
×
IamTIMMEHHH's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
IamTIMMEHHH's Contact & Social LinksIamTIMMEHHH#IamBEAR
Can you maybe do a tutorial on one of your custom perk Some ideas i would like in my map


broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 9 December 2015
Last active: 2 years ago
Posts
68
Respect
Forum Rank
Rotting Walker
Primary Group
Member
×
BrandynNew's Groups
BrandynNew's Contact & Social Links
Thanks man!

If I didn't want to require any easter egg, would I edit your script:

Quote
mask_kills_tracker()
{
while(1)
{
self waittill("zom_kill");
level notify ("got_a_mask_kill");
//iprintlnbold("got a kill");
}
}

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!
broken avatar :(
×
broken avatar :(
Location: gb
Date Registered: 13 March 2016
Last active: 4 years ago
Posts
76
Respect
Forum Rank
Rotting Walker
Primary Group
Member
×
AdvancedDecay's Groups
AdvancedDecay's Contact & Social Links
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
Last Edit: November 30, 2016, 04:27:55 pm by HitmanVere
broken avatar :(
×
broken avatar :(
Location: aupotato
Date Registered: 27 September 2013
Last active: 3 years ago
Posts
588
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
death_reaper0's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Code Snippet
Plaintext
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
broken avatar :(
×
broken avatar :(
Location: gb
Date Registered: 13 March 2016
Last active: 4 years ago
Posts
76
Respect
Forum Rank
Rotting Walker
Primary Group
Member
×
AdvancedDecay's Groups
AdvancedDecay's Contact & Social Links
Code Snippet
Plaintext
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


Double Post Merge: November 30, 2016, 02:38:54 pm
Code Snippet
Plaintext
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
broken avatar :(
×
broken avatar :(
Location: rusiberia
Date Registered: 26 June 2016
Last active: 4 days ago
Posts
155
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Community Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Do I look like a Fcking magician?
×
IamTIMMEHHH's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
IamTIMMEHHH's Contact & Social LinksIamTIMMEHHH#IamBEAR
can you add multiple of these an if its possible how?
broken avatar :(
×
broken avatar :(
Location: usAustria
Date Registered: 5 August 2016
Last active: 4 years ago
Posts
76
Respect
Forum Rank
Rotting Walker
Primary Group
Member
×
ColdShrimp2's Groups
ColdShrimp2's Contact & Social Links
This is a little late, but how do I make the reward be zombies ignore you on random occasions?
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 2 April 2014
Last active: 2 years ago
Posts
481
Respect
Forum Rank
Perk Hacker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
If it's not perfect, you'll never see it.
Signature
Learn by doing, not copy and pasting.

Enjoy my 2015 contest map, a simple map with bo1-bo2 features
http://ugx-mods.com/forum/index.php?topic=14968.msg149200#
×
Centric's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Centric's Contact & Social Linkscentricccentric_
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.
broken avatar :(
×
broken avatar :(
Location: usAustria
Date Registered: 5 August 2016
Last active: 4 years ago
Posts
76
Respect
Forum Rank
Rotting Walker
Primary Group
Member
×
ColdShrimp2's Groups
ColdShrimp2's Contact & Social Links
I want the reward to be that it gives a perk, I edited it and got this:

Code Snippet
Plaintext
if(IsDefined(self.hatModel) && self.hatModel == "char_rus_guard_ushankaup1")
{
self SetPerk("specialty_detectexplosive");
}

Where would I put this if it's correct?
Last Edit: May 30, 2017, 12:37:24 am by cjgfrosty

 
Loading ...