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

Gain Money By Damaging (Something) Script Help

broken avatar :(
Created 11 years ago
by MJPWGaming
0 Members and 1 Guest are viewing this topic.
2,526 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 26 March 2014
Last active: 5 years ago
Posts
200
Respect
Forum Rank
Mr. Elemental
Primary Group
Donator ♥
My Groups
More
×
MJPWGaming's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
MJPWGaming's Contact & Social Links
Hi I was wondering if anyone could help me out with a script I'm needing where a player could damage a area or a object and gain a specific amount of points each time they do it. Here's an example of what I'm meaning:

The player is teleported into the pack-a-punch room and there's a huge "X" on the wall. The player goes up to it and knifes it multiple times and gains points every time its knifed.
Marked as best answer by MJPWGaming 11 years ago
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 21 September 2014
Last active: 2 years ago
Posts
191
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
Let's all just light up a blunt, and make stuff.
×
AlecKeaneDUB's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
AlecKeaneDUB's Contact & Social LinksAlecKeaneDUBaleckeanedubAlecKeaneDUB
Add a trigger_damage around the 'X' and give it the targetname "knife_trig" (it can be different but must be the same as in the script) and save your map.

Then add this script at the bottom of nazi_zombieYOURMAPNAME.gsc (has not been tested in-game):
Code Snippet
Plaintext
object_damaged()
{
object_trig = getent("knife_trig","targetname");
reward = 500; //how many points the player will get, feel free to change

while(1)
{
player = undefined;
object_trig waittill("trigger", player);
wait 0.1;

player thread maps\_zombiemode_score::add_to_player_score( reward );
player PlaySound("cha_ching");
}
}

idk if this will work, as i just wrote it up very quickly. Also make sure you thread the object_damaged() function under maps\_zombiemode::main();
Last Edit: May 14, 2015, 11:56:41 pm by AlecKeaneDUB
broken avatar :(
×
broken avatar :(
[UGX] Documentation Writer & Programmer
Location: usLos Angeles, CA
Date Registered: 23 August 2013
Last active: 3 years ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Team Member
My Groups
More
My Contact & Social Links
More
Personal Quote
(ง º ω º )ง u wont sum m8y?
Signature
Do not take life too seriously. You will never get out of it alive.
×
DidUknowiPwn's Groups
UGX Team Member
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Could also change the script_model's properties using setCanDamage then a while loop with self waitill("damage")
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 26 March 2014
Last active: 5 years ago
Posts
200
Respect
Forum Rank
Mr. Elemental
Primary Group
Donator ♥
My Groups
More
×
MJPWGaming's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
MJPWGaming's Contact & Social Links
Good work with the script! Here's a video of it being tested and working exactly how it should! Thanks a bunch AlecKeaneDUB!

http://youtu.be/id3Un4FBJ9k
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 21 September 2014
Last active: 2 years ago
Posts
191
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
Let's all just light up a blunt, and make stuff.
×
AlecKeaneDUB's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
AlecKeaneDUB's Contact & Social LinksAlecKeaneDUBaleckeanedubAlecKeaneDUB
Good work with the script! Here's a video of it being tested and working exactly how it should! Thanks a bunch AlecKeaneDUB!

http://youtu.be/id3Un4FBJ9k
Cool! Glad it works :)
broken avatar :(
×
broken avatar :(
[UGX] Developer
Location: nlLimburg, Netherlands
Date Registered: 28 October 2013
Last active: 2 years ago
Posts
764
Respect
Forum Rank
The Decider
Primary Group
UGX Team Member
My Groups
More
My Contact & Social Links
More
Personal Quote
[UGX] Developer
×
Lukkie1998's Groups
UGX Team Member
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
Mapper Has released one or more maps to the UGX-Mods community.
UGX Chat Moderator Has the ability to mute, kick, or ban chat members for being abusive or breaking the rules of the forum.
UGX Site Moderator Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
2015 Participant
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
@MJPWGaming Please mark AlecKeaneDUB's answer as solved, so this help topic can be closed succesfully ;)

Thanks.

Lukkie1998

 
Loading ...