Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Hey, thanks for letting me know. I confirmed this was the case and updated the add-on. Please let me know if the issue pops up again or other issues come up.
[[TTT/2] Hot Potato!] gamemodes/terrortown/entities/weapons/weapon_ttt_hotpotato.lua:145: attempt to call method 'Detonate' (a nil value)
1. fn - gamemodes/terrortown/entities/weapons/weapon_ttt_hotpotato.lua:145
2. unknown - lua/ulib/shared/hook.lua:109
3. FireBullets - [C]:-1
4. ShootBullet - gamemodes/terrortown/entities/weapons/weapon_tttbase.lua:328
5. unknown - lua/weapons/weapon_stenmk3/shared.lua:75
[[TTT/2] Hot Potato!] gamemodes/terrortown/entities/weapons/weapon_ttt_hotpotato.lua:151: attempt to call method 'Detonate' (a nil value)
1. unknown - gamemodes/terrortown/entities/weapons/weapon_ttt_hotpotato.lua:151
I highly suspect it is because we were holding our guns for some reason and not the hot potato when we were given it, so the "GetActiveWeapon()" call was pulling the gun we were holding and not the hot potato, hence the 'Detonate' function didn't exist.
Maybe try using 'self:Detonate(ply)' instead of calling GetActiveWeapon()?
And adding a timer.Simple to ply:SelectWeapon( "weapon_ttt_hotpotato" ) so they equip it after a delay?
Also, the speed boost convar didn't seem to do anything.
Can you tell me anything that happened before the error occurred? From your description it sounds like you were holding a weapon and somebody gave you an activated hot potato, but that shouldn't cause any issues.
I'll look at the issue and also that of the convar.
That is exactly what happened. I had to manually select the hot potato to hold it, ran out of time, but didn't explode and the second error happened.
The first error happened away from me so I didn't see what happened, but I copied it from the console anyway.
I'm investigating some causes for this error. I have managed to recreate it, and it looks like other addons interfered with the logic of the potato.
The potato works by removing the equipment 1 item (slot 7 typically, but irrelevant) and replacing it with the activated potato. It doesn't matter what weapon you're holding when this happens (with the exception of a potato that's already activated).
After that, the code assumes the player is still holding the potato. I've tried to prevent players from losing the potato: they can't drop it, they can't switch weapons, it blows up on death.
I forgot that some addons could strip weapons from a player, such as the Free Kill Gun Gifter. This weapon in particular removes the equipment 1 item, and if this is an activated potato, there is no way to access Detonate(). This recreates the issue you had.
I'll try and fix this issue for some addons I know (FKG gifter, handcuffs), but could you also tell me about any other addons you use that have similar effects? This allows me to make sure the fix works for these addons as well.
On the subject of the speed convar, I can't find any issues with it either. It is only applied to the player holding an activated potato. By default it's 1.2x boost and I observe this in testing, and I confirmed the convar works in general by setting it to 100x. Maybe 1.2x wasn't noticeable?
Oh, the speed convar is only applied to a live potato? My fault then.
The hot potato never exploded when we used it around 10 times on different maps, we weren't using weapon-stripping weapons every time. But if it's working for you then there's something on my end that's interfering with it. Not sure when I can get around to testing.
As for addons I use that could strip weapons, here's some links:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2249861635
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=785294711
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1821994534
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1821993909
There's also the randomat, though that might be a bit much to make compatible:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2055805086
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2428342861
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2428350426
This mod might also interfere, putting it here just in case:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2451418207
What is a TFA Gun? Any weapon using TFA Base as a base for the weapon, for example these weapons: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2451435560
I tested with the duel-wield shotguns (classname: c_reaper_nope) from the mod above, here's what I did to get the error:
Make someone hold out a TFA weapon, give them a hot potato, and the player will fail to switch from the TFA weapon to the hot potato, after they were supposed to explode, this error will occur:
[[TTT/2] Hot Potato!] gamemodes/terrortown/entities/weapons/weapon_ttt_hotpotato.lua:164: attempt to call method 'Detonate' (a nil value)
1. unknown - gamemodes/terrortown/entities/weapons/weapon_ttt_hotpotato.lua:164
Timer Failed! [Bot03_PotatoTooHot][@gamemodes/terrortown/entities/weapons/weapon_ttt_hotpotato.lua (line 162)]
You were right! If someone is holding one of your overwatch guns when given a potato, they switch to the potato but immediately switch back.
What I did to (hopefully) fix this is to strip all weapons from the target rather than just the equipment 1 item. This circumvents that weird non-switch issue.
I wish I could think of a more elegant solution to the problem, but I don't understand the weapon not properly switching in the first place, so this will have to do.
I've updated the addon. Let me know if it's still busted!
That's awesome, good job =)