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

MOTD grenade disposal

HOT
broken avatar :(
Created 9 years ago
by HitmanVere
0 Members and 1 Guest are viewing this topic.
5,855 views
broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 8 months ago
Posts
3,997
Respect
1,024Add +1
Forum Rank
Eviscerator
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
×
HitmanVere's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
I was thinking of doing MOTD grenade disposal system, but more "futuristic". I know how to give players points with
Code Snippet
Plaintext
maps\_zombiemode_score::minus_to_player_score( cost );
But how would I go with trigger noticing grenades and then deleting them?
This topic contains a post which is marked as the Best Answer. Click here to view it.
broken avatar :(
×
broken avatar :(
True Blue Elite
Location: auAustralia
Date Registered: 8 February 2015
Last active: 8 months ago
Posts
688
Respect
Forum Rank
Zombie Enslaver
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
Still Kickin'
Signature


×
Andy Whelan's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Andy Whelan's Contact & Social LinksAndyWhelanAndyWhelan01AndyWhelan
I was thinking of doing MOTD grenade disposal system, but more "futuristic". I know how to give players points with
Code Snippet
Plaintext
maps\_zombiemode_score::minus_to_player_score( cost );
But how would I go with trigger noticing grenades and then deleting them?

This was the script I wanted as well but I forgot about it, lol
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 4 years ago
Posts
6,877
Respect
1,004Add +1
Forum Rank
Immortal
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Signature
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 ;)
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social Links[email protected]HarryBo21HarryBo000
i did this with cherry

player.score += 20;
then some function about the hud from zombiemode_score ();
broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 8 months ago
Posts
3,997
Respect
1,024Add +1
Forum Rank
Eviscerator
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
×
HitmanVere's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
i did this with cherry

player.score += 20;
then some function about the hud from zombiemode_score ();

Not really what I was asking for, lol. But thanks for info
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 4 years ago
Posts
6,877
Respect
1,004Add +1
Forum Rank
Immortal
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social Links[email protected]HarryBo21HarryBo000
Not really what I was asking for, lol. But thanks for info
whoops, i read again

youd need a trigger damage and a "waittill" to detect if its damaged, then a check to make sure its a grenade that hit it
Last Edit: June 12, 2015, 11:20:51 pm by Harry Bo21
broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 8 months ago
Posts
3,997
Respect
1,024Add +1
Forum Rank
Eviscerator
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
×
HitmanVere's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
whoops, i read again

youd need a trigger damage and a "waittill" to detect if its damaged, then a check to make sure its a grenade that hit it

Something like this?
Code Snippet
Plaintext
ent waittill("trigger", player);
if(player getCurrentWeapon() == stielhandgranate)
player maps\_zombiemode_score::minus_to_player_score( 20 );
Dunno, if that would work, lol, atleast from distances
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 4 years ago
Posts
6,877
Respect
1,004Add +1
Forum Rank
Immortal
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social Links[email protected]HarryBo21HarryBo000
looks ok, except it would take not give 20 points, is that what you wanted?
broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 8 months ago
Posts
3,997
Respect
1,024Add +1
Forum Rank
Eviscerator
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
×
HitmanVere's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
looks ok, except it would take not give 20 points, is that what you wanted?

Whoops, yeah, need to set it as -20, lol. How can I then remove the grenade like in MOTD?
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 4 years ago
Posts
6,877
Respect
1,004Add +1
Forum Rank
Immortal
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social Links[email protected]HarryBo21HarryBo000
i cant remember exactly, but if you take a look at the better script, in there it shows you how to reference the betty itself

Otherwise i will look into it when i get back home, prob wont be too hard to get what you want

were talking about the pit under the first dogs head in motd right?
broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 8 months ago
Posts
3,997
Respect
1,024Add +1
Forum Rank
Eviscerator
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
×
HitmanVere's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
i cant remember exactly, but if you take a look at the better script, in there it shows you how to reference the betty itself

Otherwise i will look into it when i get back home, prob wont be too hard to get what you want

were talking about the pit under the first dogs head in motd right?

Yes, that thing. Dunno, if betty script would work, since in same script it sets it, but in this the model is set in weaponfile
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 4 years ago
Posts
6,877
Respect
1,004Add +1
Forum Rank
Immortal
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social Links[email protected]HarryBo21HarryBo000
The betty model in the file isnt used, but it still exists. They just set a "fake model" in the same place as the original placed model is, not sure why

but i remember you could access teh grenade that you fired

like :

grenade detonate()

would make it explode, grenade delete(), would just remove it, but you have to do the waittill before it correctly ( I would show you what i mean but im on my work pc, not at home ;) ), thats the only part youll need from the betty script
Last Edit: June 12, 2015, 11:40:40 pm by Harry Bo21
broken avatar :(
×
broken avatar :(
Location: usUnion, Kentucky
Date Registered: 9 September 2013
Last active: 1 year ago
Posts
310
Respect
Forum Rank
Perk Hacker
Primary Group
Box Mappers Elite
My Groups
More
My Contact & Social Links
More
×
lilrifa's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Box Mappers Elite
Box Mappers Elite
lilrifa's Contact & Social Linksskypeuser724lilrifalilrifa
Code Snippet
Plaintext
watch_for_grenade()
{
self endon( "death" );
self endon( "disconnect" );

for (;;)
{
self waittill ( "grenade_fire", grenade, weaponName, parent );

switch( weaponName )
{
case "steilhandgrenate":
grenade disposal(self);
break;
}
}

}

disposal(player, trigger_targetname) {
for(;;) {
trig = getEnt("targetname", trigger_targetname);
trig waittill("trigger", who);
who maps\_zombiemode_score::add_to_player_score(20);
self delete();
player IPrintLnBold("Deleting Grenade");
}
}

If you thread that function in your mapname.gsc, it should wait until you've thrown a grenade, and then it should check for a grenade hitting the trigger. After the grenade hits, it will both delete the grenade so that it does not explode, and give the player 20 points.

Edit: Make sure to thread it on a player
Last Edit: June 13, 2015, 12:08:45 am by lilrifa
broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 8 months ago
Posts
3,997
Respect
1,024Add +1
Forum Rank
Eviscerator
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
×
HitmanVere's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Code Snippet
Plaintext
watch_for_grenade()
{
self endon( "death" );
self endon( "disconnect" );

for (;;)
{
self waittill ( "grenade_fire", grenade, weaponName, parent );

switch( weaponName )
{
case "steilhandgrenate":
grenade disposal(self);
break;
}
}

}

disposal(player, trigger_targetname) {
for(;;) {
trig = getEnt("targetname", trigger_targetname);
trig waittill("trigger", who);
who maps\_zombiemode_score::add_to_player_score(20);
self delete();
player IPrintLnBold("Deleting Grenade");
}
}

If you thread that function in your mapname.gsc, it should wait until you've thrown a grenade, and then it should check for a grenade hitting the trigger. After the grenade hits, it will both delete the grenade so that it does not explode, and give the player 20 points.

Will test this tomorrow, thanks. Although I dont get this part:
Code Snippet
Plaintext
trig = getEnt("targetname", trigger_targetname);
Do I change that and also in function name?
broken avatar :(
×
broken avatar :(
Location: usUnion, Kentucky
Date Registered: 9 September 2013
Last active: 1 year ago
Posts
310
Respect
Forum Rank
Perk Hacker
Primary Group
Box Mappers Elite
My Groups
More
My Contact & Social Links
More
×
lilrifa's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Box Mappers Elite
Box Mappers Elite
lilrifa's Contact & Social Linksskypeuser724lilrifalilrifa
I used trigger_targetname as a variable, so you can pass different triggers through the function. Just change it from trigger_targetname to the targetname of your trigger in the watch_for_grenade() function, and you should be all set.
Last Edit: June 13, 2015, 12:13:25 am by lilrifa
broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 8 months ago
Posts
3,997
Respect
1,024Add +1
Forum Rank
Eviscerator
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
×
HitmanVere's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
I used trigger_targetname as a variable, so you can pass different triggers through the function. Just change it from trigger_targetname to the targetname of your trigger in the watch_for_grenade() function, and you should be all set.

Alright, thanks, will test tomorrow

 
Loading ...