STEAM GROUP
Left 4 Dead 2 Workshop Beta L4D2WSB
STEAM GROUP
Left 4 Dead 2 Workshop Beta L4D2WSB
0
IN-GAME
19
ONLINE
Founded
15 October, 2012
Showing 81-90 of 125 entries
75
VScript Suggestions
18
Perl Campaign Packing Tool
75
VScript Suggestions
Originally posted by The Fish:
Perhaps a thing to think about for future titles? I think it's a bit much to ask for for an update.

Adding a survivor bot is as easy as IVEngineServer::CreateFakeClient().

Originally posted by shotgunefx:
I thought .pos was where the trace hit, but doesn't appear to be the case. I just had a prop_dyamic scan forward and down, setting it's origin to .pos, it detected what it was hitting correctly, but not where. It just kept moving a large amount in the opposite direction of the trace. I'm sure it's something I'm just not understanding. Also, can't get DebugDrawLine or DebugDrawLine_vCol to draw anything

The "pos" is where the trace hits. You need to set the "start" key to the entity's position and the "end" key to wherever, and after TraceLine() the "pos" key holds the collision point of the ray, as you already know :) Unless you set the "ignore" handle to the prop, the ray will hit the prop. If you're trying to hit some direction from the prop, you can add a scaled forward vector to the start position (to find an end position). For dynamic props, the forward vector never seems to change because its base angles don't change, so we'd need to use .Left() as well as .Forward(). By negating we can end up with Right and Backward. All in all, I don't think it's worthwhile to emulate anymore. Maybe when Source 2 comes out, we scripters will have nearly full access to the engine (in L4D3 maybe hehe) through the VM.

Anyhow, the old vscript documentation is very, very poor for some of those functions. After a quick scan of the SDK, I found this in util_shared.h:

void DebugDrawLine( const Vector& vecAbsStart, const Vector& vecAbsEnd, int r, int g, int b, bool test, float duration );

Therefore, this code should work in your nut script:

DebugDrawLine( startPos, endPos, 255, 0, 0, true, 10.0 );
3
Voice chat issues.
75
VScript Suggestions
4
4/2 Update
Showing 81-90 of 125 entries