Skip to content

[TF2] VScript implement a DIspatchEffect function #6972

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
main-thing opened this issue Feb 1, 2025 · 0 comments · May be fixed by ValveSoftware/source-sdk-2013#1208
Open

[TF2] VScript implement a DIspatchEffect function #6972

main-thing opened this issue Feb 1, 2025 · 0 comments · May be fixed by ValveSoftware/source-sdk-2013#1208

Comments

@main-thing
Copy link

This global function should allow VScript to dispatch arbitrary client effects with parameters.

DispatchEffect(string EffectName, table CEffectData)

All of the available effect data parameters should be the ones usable from effect_dispatch_data.h

Example usage:

// Spawn a Mutated Bread on the server host
DispatchEffect("TFBoltImpact", {
m_vOrigin = Vector(0, 0, 0)
m_vNormal = Vector(0, 0, 0)
m_hEntity = GetListenServerHost()
m_nAttachmentIndex = 0
m_nMaterial = 0
m_nHitBox = GetListenServerHost().entindex()
m_nDamageType= 0
m_nSurfaceProp = 0
m_fFlags = 28
m_nColor = 0
}) 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants