Garry's Mod

Garry's Mod

Not enough ratings
[TTT2] Fuse [ROLE]
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Server content
Addon Tags: Fun, Roleplay
File Size
Posted
Updated
912.605 KB
1 Jul, 2024 @ 1:50pm
23 Feb @ 7:57am
11 Change Notes ( view )

Subscribe to download
[TTT2] Fuse [ROLE]

In 1 collection by milkwater
milkwater & cheezbawlz TTT2 roles
16 items
Description
He spawned in and immediately heard the ticking noise. Tick tick tick... He knew his time left was short.

You have to use TTT2 in order to use this role. Additionally using ULX for TTT2 is recommended. Report bugs concerning this role here[github.com]. A list of all currently available roles can be found here.

Discord: https://discord.gg/9njYXGY
Source: https://github.com/milkwxter/TTT2Fuse



You are a new Traitor role with a new objective! Kill to survive!!! When the game starts, you will have 60 (configurable) seconds to get a kill, or else you will completely explode, dying instantly. Every time you get a kill it will refresh the timer so work fast!

The explosion can also kill nearby players if you feel like you can't find an opening to kill another player, such as when they are all grouped up. A sound will also play to warn those nearby when the Fuse is about to explode.




Convars are variables that are introduced to allow server owners to customize the gameplay without changing the code. There are always a handful of convars automatically created by TTT2, that define the spawn parameters of this role and are found in ULX. Additionally there might be some role specific convars, which have to be set in the server config file.

Normal Role Convars (also found in ULX)
# enable or disable this role ttt_fuse_enabled [0/1] (default 1) # the percentage of players that are spawned as this role ttt_fuse_pct [0.0..1.0] (default 0.15) # the limit of players that spawn as this role each round, this overwrites the percentage ttt_fuse_max [0..n] (default 1) # the probability each round of this role being spawned at all ttt_fuse_random [0..100] (default 33) # the amount of players needed for this role to spawn ttt_fuse_min_players [0..n] (default 6)

Fuse Specific Convars
# how many seconds before the fuse explodes ttt2_fuse_explode_timer [5..120] (default 60)
--
Credits
milkwater: Coding
cheezbawls: Coding
Brickclay: Bomb icon, from the Noun Project
LUTFI GANI AL ACHMAD: Explosion icon, from the Noun Project
12 Comments
milkwater  [author] 23 Feb @ 8:01am 
MooseGoneMad, I think I have fixed the issue. The error occurs when someone is killed by something that is neither a player or the world, I wonder what it was that caused the error in the first place.

Anyways I implemented some extra checks to make sure the attacker is both valid and a player in the first place so this should no longer cause errors. Sorry that it was glitching out.

Thank you for providing an error log, I really appreciate it! :steamthumbsup:
MooseGoneMad 22 Feb @ 6:58pm 
Lua error I'm getting:

[[TTT2] Fuse [ROLE]] lua/terrortown/entities/roles/fuse/shared.lua:100: attempt to call method 'GetSubRole' (a nil value)
1. fn - lua/terrortown/entities/roles/fuse/shared.lua:100
2. Run - lua/ulib/shared/hook.lua:109
3. unknown - gamemodes/terrortown/gamemode/server/sv_player.lua:906
MooseGoneMad 11 Feb @ 7:05pm 
Yup -- it's the old ttt hud! On the new HUD it appears as expected. I'll let players know that :steamthumbsup:
milkwater  [author] 9 Feb @ 12:23pm 
MooseGoneMad, I am sorry to hear the addon is not working properly on your server.

I have the timed status being added to the Fuse player as soon as the role is assigned, so I don't know how that could mess up. It's the same method as where the detective spawns with a DNA scanner.

The only thing I can think of is that other players are using a different HUD. I am pretty sure the old TTT HUD does not support timed status effects. Do you think you could get this information from them? I really would like to help fix this. :reheart:
MooseGoneMad 9 Feb @ 11:59am 
Yes, sorry, I meant the left side of the screen. Some of my players are seeing it, some are not -- maybe something to do with screen resolution? Just spitballing. Other "on-screen buffs" appear as they should, though, so it's something specific with this addon.
milkwater  [author] 27 Jan @ 4:28pm 
MooseGoneMad, Can you provide some more information? I just went in game to test it and the timer does infact show up on the left side of the screen. Could you try again and check the left side of the screen, instead of the right? Thank you!
MooseGoneMad 27 Jan @ 3:58pm 
Role (seems to) work, but I don't see the timer on the right side of the screen.
Kawasaki Ki-10 3 Sep, 2024 @ 4:40pm 
Oh wow, that might be the fastest fix anything has ever gotten, thank you so much!
milkwater  [author] 3 Sep, 2024 @ 4:37pm 
Kawasaki Ki-10, I went into a game to test it and to my surprise, killing someone actually did not refresh my timer!

I have fixed this issue now, I went into a game and shot a guy and boom, my timer reset! Hope you enjoy this role properly now. :steamthumbsup:
Kawasaki Ki-10 3 Sep, 2024 @ 4:19pm 
We used this in a small server with friends and kills didn't reset the timer. Everything else worked great though. Did I miss a config setting?