• [Trouble in Terrorist Town] Hitman modification
    76 replies, posted
Send your target entity instead of username to target, so you can change HUD to show ** TARGET ** or something when you look at your hit. You can also use 1 usermessage instead of multiple usermessages that do the same thing too, e.g. the set hit and or disspointment usermessage. [lua]usermessage.Hook( "hitman_alive", function( UMsg ) alive = UMsg:ReadBool() and 1 or 0 if alive then print( "Alive!" ) end end )[/lua]
Of course, you're right. <--- Goes and cleans up code edit: Does there happen to be a nice function to set the status on the scoreboard? Then I will implement it immediately. I've seen something similar in MORBUS. Might wanna look into that source.
[QUOTE=Mezzokoko;42507613] Can you reproduce that? Does it happen everytime? Are there other addons installed, which might interfere?[/QUOTE] It's a clean server. this is the only addon installed. It happen every time a traitor is killed by another traitor.
Alright, issue noted, I will take care of it ASAP. Probably something goes wrong with the victim, killer comparisions and as a result of that everything in the PlayerDeathEvent stops. Thx for the hint. edit: Unfortunately I can't reproduce that bug. Are you sure you have the latest version downloaded? Does the console say anything about script errors?
Does this addon apply every round or just at random?
It applies at every round, [del]but a convar is planned with which you can simply turn it on or off.[/del] May take some time though because school started recently and I still want to focus on cleaning out any bugs before moving on to coding new stuff. edit: Also at its current stage it is more of a mod than an addon.
[QUOTE=CallMePyro;42503382]I'm having a bug where if a traitor dies, they stay on the alive team and can talk normally. Thank goodness I tested this before putting it on my server.[/QUOTE] I encountered the same bug, with the difference that this happened to players who were killed by the world. The issue has been fixed, but I still wonder how this happens for you when a T kills a fellow T. Are you sure the damage is inflicted directly, and not like over a trap?
While fixing bugs and researching the scoreboard-tagging feature, I came up with a different idea of finding your target. It is basicily a radar which shows the location of your target, but in realtime. Finding your target on huge maps is much easier and less frustrating. The realtime scanning shouldn't be hard aswell since you can only see your target. That way it is not a "wallhack". I will probably go on to code this for now. Any feedback on the idea? Suggestions or opinions?
[QUOTE=Mezzokoko;42674299]While fixing bugs and researching the scoreboard-tagging feature, I came up with a different idea of finding your target. It is basicily a radar which shows the location of your target, but in realtime. Finding your target on huge maps is much easier and less frustrating. The realtime scanning shouldn't be hard aswell since you can only see your target. That way it is not a "wallhack". I will probably go on to code this for now. Any feedback on the idea? Suggestions or opinions?[/QUOTE] Perhaps instead of having it realtime, do it in. 10-15 second pauses. Maybe add some unique sweps to it? For example , the Headcrab launcher doesn't really fit for one target, since it'd be easy to hit a civilian instead
I though about adding a few sweps to it, but I haven't really found the time to do that yet. The Headcrab launcher is not made by me, it's a Weapon the serverowner has put on the server (along with a few other features which I didn't contribute to). As for the radar: At the moment I put the Radartimer to five seconds for traitors (Realtime does not work yet, I would have to put the whole code into a ThinkEvent and I don't wanna mess with that atm). That should be enough for finding targets quickly. I will probably upload it soon.
[QUOTE=Mezzokoko;42683151]I though about adding a few sweps to it, but I haven't really found the time to do that yet. The Headcrab launcher is not made by me, it's a Weapon the serverowner has put on the server (along with a few other features which I didn't contribute to). As for the radar: At the moment I put the Radartimer to five seconds for traitors (Realtime does not work yet, I would have to put the whole code into a ThinkEvent and I don't wanna mess with that atm). That should be enough for finding targets quickly. I will probably upload it soon. [B](If this Note is here, the game hasn't been updated yet)[/B][/QUOTE] For realtime, or simulated realtime, try refreshing every second?
Yeah it refreshes every second at the moment, but that is not realtime ;). In a realtime radar you could follow your targets movement very fluently. However, the concept itself works for now, so Ill go ahead and upload it now.
How to add nick of target to HUD For example I use for PointShop this command: [QUOTE]local hud3 = LocalPlayer():PS_GetPoints()[/QUOTE] But How to change it for nick of target?
Clientside you can get the targets nickname in the var "targetname". It is declared as a local though so it is not accessible from the outside. You could go and set it global yourself in "cl_hitlist.lua". I might make it global myself in the future, so that other addons can access it aswell. \terrortown\gamemode\cl_hitlist.lua, line 1: change [lua]local targetname[/lua] to [lua]targetname = ""[/lua]
[QUOTE=Mezzokoko;42926703]Clientside you can get the targets nickname in the var "targetname". It is declared as a local though so it is not accessible from the outside. You could go and set it global yourself in "cl_hitlist.lua". I might make it global myself in the future, so that other addons can access it aswell. \terrortown\gamemode\cl_hitlist.lua, line 1: change [lua]local targetname[/lua] to [lua]targetname = ""[/lua][/QUOTE] Thank you, now it works :D [editline]21st November 2013[/editline] After killing all targets (time between end of round and start of new round) traitors have error: [QUOTE][ERROR] lua/includes/modules/draw.lua:73: bad argument #1 to 'GetTextSize' (string expected, got nil) 1. GetTextSize - [C]:-1 2. SimpleText - lua/includes/modules/draw.lua:73 3. fn - addons/fc_ttthud/lua/autorun/ttthud.lua:974 4. unknown - addons/ulib/lua/ulib/shared/hook.lua:183 [/QUOTE]
Does this maybe have something to do with yer pointshopstuff? When a Hitman doesn't have a target the string sets itself to nil. Just check if that is the case and disable your feature if true. [lua]if targetname != nil then do_ps_stuff() end[/lua]
Not to suggest much but don't you think in would be better to take the TTT files and put them in a new gamemode folder and then rename it to a different gamemode name like contract, hitman, or Hitman Trouble Town just so people can still see it is a modded gamemode instead of placing over current TTT files. This makes it an individual gamemode that is rooted/based in TTT. This keeps the original files safe and you can play both gamemodes without modding your gamemode folder anymore. It would be simpler unless there is a reason that you can't of which I need to have explained to me.
It has a couple of reasons why I chose to only supply the modified files. First of all, making a new gamemodefolder didn't really quite work well. Some custom addons and textures don't get mounted properly if they can't find their "terrortown" gamemode. Also I don't want to simply repost most of BadKings work without permission. The original files are free to everyone, so everyone also can get them themselves. tl;dr: Directly modifying the files works best atm, and it will take me some time and motivation to convert it into addon-form edit: Made "targetname" and "traitor_targets" global, for use by other addons.
sounds pretty cool! might have to try this out!
Unfortunately there barely are servers atm. There were a few in the beginning, but they were cancelled because it couldn't pull many players (Mostly due to many people being confused at first and not knowing what to do). If you want to host a server with this, feel free to post your server adress here :)
I'm in the process of purchasing another gmod server specifically for Murder. I think I may try this first. I think if the server name had 'hitman' in it and a custom loading screen explaining differences it might do better. I'll share an IP possibly later today if not the weekend.
WLC Hitman Gametype: 192.210.238.98:27213 If anyone's interested in checking it out.
I really like this, gonna talk to the owner of the server I co-own and see if we could add this. Tried it on a local server with bots and it was fantastic! /love
Added Remotemines to the standard arsenal of the hitmen.
This seems very interesting. I might be willing to add this into my server. You should have made this an addon to TTT so the servers would be populated, because new gamemodes don't really get too populated. I might be willing to try this out.
I took this gamemode and made a few additions to it. The hitman thing is cool, but play testing showed that it was crazy unbalanced. Detective dna scanners make winning as a hitman near impossible, and the death on mis-kill means that hitmen can't protect themselves against attackers. The whole system is flawed, and in a game as social as TTT, this makes it broken. I do very much appreciate the change of pace and the idea was cool, but it definitely needs more balancing. That being said, I thought the idea deserved more thought, so I changed the gamemode in a much more fundamental way. It's not quite finished yet, but here is how it works: Hitmen still do the same task as before. Detectives are now Jihadists, given only a jihad bomb and cloaking device. This helps balance in 2 ways: spreads people out (big groups are prime targets) and also eliminates the unbalanced detective class. The trade off is that the civilians have a harder time finding the hitmen, but hitmen already have a harder time (because they have to kill the target only) so it balances out. It takes a lot of gamemode file edits to make this change, but I'm having fun with it :D
First away: You can change the punishment with the ConVar hitman_punishment (1 = kill, 2 = reveal, will be swapped with the next few updates, be aware) To be honest, I don't think the Detectives are not that unbalanced. I might have to tweak the ratio a little, but the Detectives role still has its right of existence. I also don't get what you are trying to achieve with Jihads. This mod is supposed to make the game more stealth-oriented and slowerpaced by making the hitmen follow their targets until there is an opportunity to kill them. At this point I must say that it pretty much depends on the map, if the game is well balanced. Maps like amsterville have a lot of sniper spots, where it doesn't matter that much if people crowd up. It also depends on how well you handle the RDM. If you are dealing with a lot of RDMers I wouldn't recommend this for your server because you will have a hard time getting a fun experience. If you take the Jihadidea out of TTT-context though I think it would be a nice gamemode on it's own. Couple of Jihadists trying to kill as many innocents, if any innocents survive, the Jihadists lose. Also, there is no other weapon than jihads, to it all depends on running away and surviving (Maybe one cop, who has a pistol with which he can shoot a jihadist, if he sees one).
I wish I had read through the hitlist file more thoroughly. Had no idea about the reveal feature. That is definitely what I am looking for, since all new players are having a hard time figuring that out. It is much more noob-friendly to just reveal them than to kill them immediately. I think I had a different idea in mind when I read through your description initially. I guess when you expect a different style of game than what you are seeing, things seem to be broken. I was looking at this as still a casual game, just a bit more challenging than TTT. This seems like it would be best (with the kill feature) to play with a bunch of good friends who all understand the gamemode, rather than on a public server with random players. About the Jihadist gamemode, I actually had some of my players suggest a gamemode: hitmen vs jihadists only. One team has guns, the other is invisible and have only jihads. I might test this out, just for the lols, but I like the unknown aspect of it by only having 1 or 2 random players who could turn invisible at any moment. Your jihad gamemode idea sounds an awful lot like murder. Just a bit more explosive, if you catch my drift ;)
Yeah you are probably right. Should be simple to modify that one to Jihad-action ^^ Mind if I add your server to the list?
Sounds awesome, can't wait to test it out, continue making awesome stuff!
Sorry, you need to Log In to post a reply to this thread.