Garry's Mod

Garry's Mod

33 ratings
[TTT2] Spectre [ROLE]
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Server content
Addon Tags: Fun, Roleplay
File Size
Posted
Updated
371.231 KB
22 Jun, 2020 @ 7:12pm
1 Dec, 2021 @ 7:59pm
22 Change Notes ( view )

Subscribe to download
[TTT2] Spectre [ROLE]

In 4 collections by Wasted
TTT2 Dingus Server
581 items
Dingus Playerside
320 items
TTT2 Dingus Beta Collection
45 items
Dingode TTT2
322 items
Description
Your spirit is strong, and even if you die you shall rise once more!

Based on the Phantom from Custom Roles for TTT.

Requires TTT2 in order to use this role. A list of all currently available roles can be found here

Source: https://github.com/ZacharyHinds/ttt2-role-spectre





The Spectre is an innocent role. When they are killed, they haunt their killer! Their haunt is visible as smoke around their attacker (configurable with ConVars) and when their attacker dies, they revive!





Normal Role Convars (also found in F1 Menu):
# enable or disable this role ttt_spectre_enabled [0/1] (default: 1) # the percentage of players that are spawned as this role ttt_spectre_pct [0.0..1.0] (default 0.15) # the limit of players that spawn as this role each round, this overwrites the percentage ttt_spectre_max [0.0..n] (default: 1) # the probility each round of this role being spawned at all ttt_spectre_random [0..100] (default: 33) # the amount of players needed for this role to spawn ttt_spectre_min_players: [0..n] (default: 6)

Role Specific Convars (also found in F1 Menu):
# the amount of health a spectre revives with ttt2_spectre_revive_health [1..n] (default 50) # enable or disable the spectre's smoke ttt2_spectre_smoke_mode [0 or 1] (default 1) # who sees the announcement that the spectre has died (0 - no one, 1 - everyone, 2 - only detectives) ttt2_spectre_declare_mode [0 or 1 or 2] (default 2) # Whether or not the spectre respawns at worldspawn or at their body. ttt2_spectre_worldspawn [0 or 1] (default 0)


--
Credits:
Wasted: creator of this role addon
Tim | Mineotopia: creator of icon
13 Comments
Loussio 5 Aug, 2023 @ 10:37am 
what happen if he get killed by the infected ? he will still haunting the infected or he will become a zombie ?
|UGA|PatPeter 9 Sep, 2021 @ 11:25pm 
I created a master configuration file for all of the TTT roles in the first 3 pages of the Workshop search: https://gist.github.com/PatPeter/70b1c090d8c8c311d99632dca76ec513
Wasted  [author] 4 Jan, 2021 @ 3:42pm 
@Cpt.Haxray That's fine with me so long as you credit me!
Cpt.Haxray 2 Jan, 2021 @ 9:16pm 
Hey, i made a custom edit of this role for a server called the Haunted that is on the Traitor team. Since its still mostly your code(basically just swapped role, swapped all references to Spectre to Haunted, and replaced Icons with new ones), would you be fine with me uploading it to the steam workshop(i could add you as a contributor as well if need be)?
Wasted  [author] 8 Sep, 2020 @ 8:46am 
@fskin @Catherine It should be fixed, let me know if the error persists
Wasted  [author] 8 Sep, 2020 @ 8:31am 
Ah, I was trying to patch a problem with Spectator Deathmatch, but if you don't have that installed it breaks, will put out a fix shortly
fskin 8 Sep, 2020 @ 6:40am 
Same problem. Error:

[[TTT2] Spectre [ROLE]] lua/terrortown/autorun/shared/sh_haunt_handler.lua:48: attempt to call method 'IsGhost' (a nil value)
1. fn - lua/terrortown/autorun/shared/sh_haunt_handler.lua:48
2. Run - lua/ulib/shared/hook.lua:109
3. unknown - addons/ttt2-master/gamemodes/terrortown/gamemode/server/sv_player.lua:836
Wasted  [author] 18 Jul, 2020 @ 6:43pm 
@PROFI I've added your idea as a new ConVar, set ttt2_spectre_worldspawn to 1 and the Spectre should respawn at one of the map's spawnpoints
Tim | Mineotopia 15 Jul, 2020 @ 5:29am 
you could revive the player at a spawnpoint instead of the revival at their bodyposition. Take a look at the spawn library to learn about those functions.
KillerfoxyLP 15 Jul, 2020 @ 3:59am 
@Wasted could u do that where the spectre dies respawn? because i just died somebody made my body fell of the building and i died instantly there