Welcome, Guest. Please login or register.
Did you miss your activation email?
September 19, 2024, 11:58:20 PM
Home Help Login Register
News: Zombie Master 2 discussion

Zombie Master  |  Other  |  Trouble in Terrorist Town  |  Topic: Creating Non-SWEP Traitor Items
Pages: [1]
Author Topic: Creating Non-SWEP Traitor Items  (Read 5181 times)
Domineeto
Poster

Posts: 3


« on: July 31, 2010, 10:26:49 PM »

I recently had an idea for traitor equipment that reduced falling damage so you could kill innocents more easily by crushing them, but I do not know how to start the script to make it passive like body armor. I've looked through my ttt folder and can't find the script for the body armor so I could use it as a base, anyone know if this is possible?
bigbadboo
Poster

Posts: 287


« Reply #1 on: July 31, 2010, 10:41:43 PM »

"Lead boots" Would be funny, a new range of divebombing traitors.
Domineeto
Poster

Posts: 3


« Reply #2 on: August 01, 2010, 12:16:45 AM »

Yeah, but now that the fall damage has increased its become very difficult to do this D:
manbearpig101
Poster

Posts: 11


« Reply #3 on: August 01, 2010, 02:44:19 AM »

Well, Domineeto. For the body armor I am going to lead you to the "player.lua" file.

Find the "GM:ScalePlayerDamage" hook and then scroll down to:


if dmginfo:IsBulletDamage() and ply:HasEquipmentItem(EQUIP_ARMOR) then
      -- Body armor nets you a damage reduction.
      dmginfo:ScaleDamage(0.7)
  end


There is your body armor code. No problemo.
Bad King Urgrain
Administrator
*****
Posts: 12276



« Reply #4 on: August 01, 2010, 08:39:06 AM »

If you're not familiar with (gmod's) Lua, an equipment item (as opposed to a weapon) is one of the hardest customizations to make. They're not isolated to a single script like a weapon, so you'll also have to manually update your modifications into every new version.

Fall damage is something I'm actively tuning. The "safe distance" before you get damaged is a little too low again right now, and I will also be further reducing the amount of damage you still get when landing on someone.
« Last Edit: August 01, 2010, 08:41:08 AM by Bad King Urgrain »
JoshJosh117
Poster

Posts: 16


« Reply #5 on: August 02, 2010, 08:46:03 PM »

I love jumping on people's heads in the elevator at ttt_nexus_final. So a custom item like this would be great.
Marauder8
Build Tester
*
Posts: 4639


Future Emperor of Antarctica


« Reply #6 on: August 02, 2010, 09:02:41 PM »

I just had this idea for the Detective, it's and armoured hat(or mabye a helmet) which protects them from fall damage, and is visible on their model. You always said you wanted to implement a hat into TTT but didn't know a way to do it without breaking anything. It could even be a little detective hat.

THIS RAINCOAT IS FROM THE DEVIL
Pages: [1]
Zombie Master  |  Other  |  Trouble in Terrorist Town  |  Topic: Creating Non-SWEP Traitor Items « previous next »
Jump to:  


Login with username, password and session length

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines
Page created in 0.01 seconds with 18 queries.