generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: ROBLOX Original Paintball Script Question

Previous Thread :: Next Thread 
Victoria0001 is not online. Victoria0001
Joined: 27 Jun 2010
Total Posts: 781
30 Apr 2014 03:45 PM
I'm looking through the original paintball gun script, and I found these lines:



function tagHumanoid(humanoid)
-- todo: make tag expire
local tag = ball:findFirstChild("creator")
if tag ~= nil then
local new_tag = tag:clone()
new_tag.Parent = humanoid
end
end


function untagHumanoid(humanoid)
if humanoid ~= nil then
local tag = humanoid:findFirstChild("creator")
if tag ~= nil then
tag.Parent = nil
end
end
end





And the question I had was, why does it have to tag you anyway?
Report Abuse
DrMathematica is not online. DrMathematica
Joined: 29 Aug 2008
Total Posts: 27268
30 Apr 2014 03:48 PM
Think about how ROBLOX tracks the kills you get in-game. It doesn't just magically know when you kill another player. They use ObjectValues called 'creator' and place them inside Humanoids whenever you deal damage with a tool. The Value of this ObjectValue is the player who dealt the damage. When the Humanoid dies, the player who last did damage gets the KO tracked to their profile.

As you can see, this can be easily exploited to get an enormous amount of KOs. Very easily.
Report Abuse
Victoria0001 is not online. Victoria0001
Joined: 27 Jun 2010
Total Posts: 781
30 Apr 2014 03:49 PM
Why doesn't it just track the kills behind the scenes like it does most of everything else? Like your wipeouts.
Report Abuse
DrMathematica is not online. DrMathematica
Joined: 29 Aug 2008
Total Posts: 27268
30 Apr 2014 03:51 PM
Wipeouts are easier to track. It just detects when _you_ die. It doesn't have to do anything else.

And think about it. How would they track who you kill in any game? You really can't. It has to be done manually.

If you kill someone with something that doesn't use tags, then you'll notice your KOs won't increase.
Report Abuse
Victoria0001 is not online. Victoria0001
Joined: 27 Jun 2010
Total Posts: 781
30 Apr 2014 03:53 PM
Do most PvP games on the games menu now use this method?
Report Abuse
DrMathematica is not online. DrMathematica
Joined: 29 Aug 2008
Total Posts: 27268
30 Apr 2014 03:54 PM
Most weapons and such have always used this method. It's common, but you might notice some people who make their own weapons (and are new to it) forget to add tags; or they don't even know they should.

So, yes, almost all games are okay on this aspect.
Report Abuse
Victoria0001 is not online. Victoria0001
Joined: 27 Jun 2010
Total Posts: 781
30 Apr 2014 03:56 PM
Oh okay. Do you only have to make the tag?
Report Abuse
DrMathematica is not online. DrMathematica
Joined: 29 Aug 2008
Total Posts: 27268
30 Apr 2014 04:02 PM
I don't understand what you mean.

You just have to create the tag exactly how they do and place it in the Humanoid of the person being hit.
Report Abuse
Victoria0001 is not online. Victoria0001
Joined: 27 Jun 2010
Total Posts: 781
30 Apr 2014 04:04 PM
Oh okay. Does it only work with humanoids that belong to players?
Report Abuse
DrMathematica is not online. DrMathematica
Joined: 29 Aug 2008
Total Posts: 27268
30 Apr 2014 04:04 PM
I believe so, yes. Not NPC characters.
Report Abuse
Victoria0001 is not online. Victoria0001
Joined: 27 Jun 2010
Total Posts: 781
30 Apr 2014 04:05 PM
Ah okay
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image