PDA

View Full Version : [TF2] Scream Fortress 2 added vehicle (and other) mechanics!


sarysa
10-29-2014, 19:53
With the bumper cars we now have some sort of real vehicle mechanics. Way better than hacking the conga taunt, too. Finally. :D

So who's going to be the first to figure out how to use them?

Discovered so far
addcond 82 is bumper cars (credit to arthurdead)

Still to find
Good version of underwater
Are there any props added to TFPlayer used by vehicle mechanics?

friagram
10-29-2014, 19:55
mabye it's just tanktrains hacked onto some obvuscated path_Track system.

sarysa
10-29-2014, 20:10
It's full player control. They did everything right this update...previous updates had many flaws but we've gotten a bunch of goodies now.

Another thing to research is there may be a way to properly convert an entire map to underwater now, versus the hackish version that FF2 servers use. It's one of the Merasmus spells added which executes when a round takes too long.

404UserNotFound
10-29-2014, 20:19
I believe it's an actual condition. I haven't researched this or checked anything, but it seems to be a condition which is great which means we could soon see a Bumper Car plugin.

arthurdead
10-29-2014, 20:40
addcond 82

sarysa
10-29-2014, 21:08
Holy crap, thanks Valve for making it easy. I'll edit my first post to mention that. Nice find arthur!

Can't wait to see what people make with it.

404UserNotFound
10-29-2014, 21:18
Findings: AddCond 82 makes you drive, but does not display the bumper car. There must be another condition...

For testing, use this:

#include <sourcemod>
#include <tf2_stocks>

#pragma semicolon 1

public Plugin:myinfo =
{
name = "GET OFF THE ROAD, JACKASS",
author = "404: User Not Found",
description = "harp darp i am plugan mastar.",
version = "1.0",
url = "http://www.unfgaming.net"
}

public OnPluginStart()
{
RegConsoleCmd("sm_beepbeep", Command_Drivan);
}

public Action:Command_Drivan(client, args)
{
TF2_AddCond(client, 82);
}

stock TF2_AddCond(client, cond) {
new Handle:cvar = FindConVar("sv_cheats"), bool:enabled = GetConVarBool(cvar), flags = GetConVarFlags(cvar);
if(!enabled) {
SetConVarFlags(cvar, flags^FCVAR_NOTIFY);
SetConVarBool(cvar, true);
}
FakeClientCommand(client, "addcond %i", cond);
if(!enabled) {
SetConVarBool(cvar, false);
SetConVarFlags(cvar, flags);
}
}

arthurdead
10-29-2014, 21:23
m_iKartState

doenst show the car maybe because you need to precache the model

404UserNotFound
10-29-2014, 21:34
m_iKartState

doenst show the car maybe because you need to precache the model

Code up an example of m_iKartState being used.

Also how did you figure this shit out O_o

arthurdead
10-29-2014, 21:40
Code up an example of m_iKartState being used.

Also how did you figure this shit out O_o

https://forums.alliedmods.net/showthread.php?p=2217621
it wanst me it was Dr.McKay in irc
sm_dump_netprops

arthurdead
10-29-2014, 22:39
Are there any props added to TFPlayer used by vehicle mechanics?


m_flKartNextAvailableBoost
m_iKartHealth
m_iKartState
m_flTorsoScale
m_flHandScale
new entities

tf_halloween_minigame
tf_halloween_minigame_falling_platforms
tf_logic_minigames
tf_pda_expansion_dispenser
tf_pda_expansion_teleporter
tf_projectile_spellkartbats
tf_projectile_spellkartorb
tf_teleport_location
halloween_fortune_teller
tf_base_minigame
trigger_apply_impulse
trigger_teleport_relative
tf_halloween_pickup
prop_soccer_ball

Dr. McKay
10-29-2014, 23:31
Findings: AddCond 82 makes you drive, but does not display the bumper car. There must be another condition...

For testing, use this:

#include <sourcemod>
#include <tf2_stocks>

#pragma semicolon 1

public Plugin:myinfo =
{
name = "GET OFF THE ROAD, JACKASS",
author = "404: User Not Found",
description = "harp darp i am plugan mastar.",
version = "1.0",
url = "http://www.unfgaming.net"
}

public OnPluginStart()
{
RegConsoleCmd("sm_beepbeep", Command_Drivan);
}

public Action:Command_Drivan(client, args)
{
TF2_AddCond(client, 82);
}

stock TF2_AddCond(client, cond) {
new Handle:cvar = FindConVar("sv_cheats"), bool:enabled = GetConVarBool(cvar), flags = GetConVarFlags(cvar);
if(!enabled) {
SetConVarFlags(cvar, flags^FCVAR_NOTIFY);
SetConVarBool(cvar, true);
}
FakeClientCommand(client, "addcond %i", cond);
if(!enabled) {
SetConVarBool(cvar, false);
SetConVarFlags(cvar, flags);
}
}
There are no words.

Dr. Greg House
10-29-2014, 23:59
"harp darp i am plugan mastar."

There you have the words.

friagram
10-30-2014, 03:41
There are no words.

K so release a plugin that's based on one line, and should be 10 lines, but make it 200
Owait..

Or you can just wrap the tf2addcondition/removecondition natives and bam, future proofed.
At least thats what I use, but whatever. Running 50 plugins to do something 1 can do is fun also.

Anyways, aside from a few conds like the kart/kart boost, underwater, there is a jail cond, melee restrict, and such associated with the merasmus randoms. Just make sure to precache the models associated with the cond (like last year, with the ghost, the cart/jail bars are not auto precached).

Taunting changes some, there is a defindex for players in taunt condition now, so you can see what taunt they are doing (forward speed is now gone, but was useless anyhow).

Buildables seem to have a new metal upgrade prop. Nfi what its for. Also some new entities for pda stuff, perhaps wearable related, didnt check.

There are new minigame entities (used for the race tracks?)

Chdata
10-30-2014, 06:46
enum
{
_BumperCar = 82,
_KartSpeedBoost,
_BalloonHead,
_SmallHeadMeleeOnly,
_JarateSwimming,
_NoMove,
_NoMoveGateBlock,
_NoMoveGateBlock2
}

flocke0
10-30-2014, 07:35
I modified the given code above to put players in carts when they spawn. Will continue coding on it tonight when im home, but for now here is the IP so you guys can test it: 176.57.141.165:48815

A question regarding karts: Obvioulsy Valve blocks the usage of weapons there. Is there any way to use weapons while being in kart mode? I was able to spawn items via tf2items, but still they are not shootable

thx in advance

flobbo

Sreaper
11-01-2014, 16:57
How do you get the horsemann to spawn with the necro smasher?

friagram
11-02-2014, 18:41
It seems the kart spawns facing the tauntyaw angle, but when you set that value, it gets overridden. There must be some hidden netprop or something to set the tauntyaw, does anyone know it?

Chdata
11-03-2014, 00:08
Well, FlaminSarge used a usermessage or something to force the angles in my bumper car plugin.

friagram
11-03-2014, 20:04
I noticed there is a new entity for teleporting the karts, but there is game logic to use it

Ill look through your code again, but i did not see any usermessages, is it posted?

Plaffy46
11-04-2014, 09:25
Did anyone figure how to dynamically change the model of the kart?
Perhaps I'm wrong, but the kart itself isn't an entity, is it?

friagram
11-04-2014, 10:05
It's a taunt, and the cart is a taunt prop? Or a wearable, i didnt check.

Plaffy46
11-04-2014, 10:17
If it's a wearable, could I just search for "tf_wearable" entities, and check their current model/owner?

If it's a taunt prop, what are the steps to get the entity (what type of entity would it be then, btw? prop_dynamic or something else)?

Edit : oh, tf_taunt_prop entity, then? Guess I'll investigate about this.

Edit 2: Well, I think OnENtityCreated() with the model check should do it. I'll tell you if this works.

thecount
11-04-2014, 16:18
I'm not sure if the swimming effect adds the actual jarate effect as well, or if they only put the vision of it. If it's the actual jarate condition, then:
TF2_AddCondition(client, 86);//Swimming in air
TF2_RemoveCondition(client, TFCond_Jarated);

Wliu
11-04-2014, 17:53
I'm not sure if the swimming effect adds the actual jarate effect as well, or if they only put the vision of it. If it's the actual jarate condition, then:
TF2_AddCondition(client, 86);//Swimming in air
TF2_RemoveCondition(client, TFCond_Jarated);
Pretty sure everything is mini-critted, so yeah.