Raised This Month: $51 Target: $400
 12% 

TE_SetupExplosion: Sprite is not loaded correctly


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dr. Greg House
Professional Troll,
Part-Time Asshole
Join Date: Jun 2010
Old 02-24-2012 , 15:25   TE_SetupExplosion: Sprite is not loaded correctly
Reply With Quote #1

The game I'm using is l4d2.

The sprite is loaded at OnPluginStart:
Code:
g_sprite = PrecacheModel("materials/particle/fire_explosion_1/fire_explosion_1.vtf");
And that's the way the explosion effect is created:
Code:
TE_SetupExplosion(pos, g_sprite, 5.0, 1, 0, 100, 5000);
This results in an explosion of purple-black chessfields. No errors in the logs. What is causing this? Because I looked it up in pak01_dir.vpk and the file exists in
Quote:
root\materials\particle\fire_explosion_1\fire _explosion_1.vtf
, although it behaves like it doesn't (changing the filepath to something random results in the same behavior).

Thanks in advance!
House

Last edited by Dr. Greg House; 02-24-2012 at 15:26.
Dr. Greg House is offline
mcpan313
Senior Member
Join Date: Mar 2010
Old 02-24-2012 , 17:14   Re: TE_SetupExplosion: Sprite is not loaded correctly
Reply With Quote #2

try
Code:
g_sprite = PrecacheModel("materials/particle/fire_explosion_1/fire_explosion_1.vmt");
__________________
sorry, for my poor english.

Last edited by mcpan313; 02-24-2012 at 17:18.
mcpan313 is offline
Send a message via MSN to mcpan313
Dr. Greg House
Professional Troll,
Part-Time Asshole
Join Date: Jun 2010
Old 02-24-2012 , 17:29   Re: TE_SetupExplosion: Sprite is not loaded correctly
Reply With Quote #3

Still not working, same issue.
Dr. Greg House is offline
blodia
Veteran Member
Join Date: Sep 2009
Location: UK
Old 02-24-2012 , 18:35   Re: TE_SetupExplosion: Sprite is not loaded correctly
Reply With Quote #4

try precaching on map start.
also you can't actually choose sprites on some tempents even though they have a parameter for it, most default sprites are in the hl2 gcf's.
blodia is offline
Dr. Greg House
Professional Troll,
Part-Time Asshole
Join Date: Jun 2010
Old 02-24-2012 , 18:48   Re: TE_SetupExplosion: Sprite is not loaded correctly
Reply With Quote #5

Still no difference.
Is there a list of models/sprites I can use for sure? Which one can I use for an explosion?
Dr. Greg House is offline
mcpan313
Senior Member
Join Date: Mar 2010
Old 02-24-2012 , 18:52   Re: TE_SetupExplosion: Sprite is not loaded correctly
Reply With Quote #6

try again
PHP Code:
public OnPluginStart()
{
    
RegConsoleCmd("test"test);
}

new 
g_sprite;
public 
OnMapStart()
{
    
// "materials/sprites/glow01.vmt"
    // "materials/sprites/laserbeam.vmt"
    
g_sprite PrecacheModel("materials/sprites/halo01.vmt");
}

public 
Action:test(clientargs)
{
    
decl Float:pos[3];
    
GetClientAbsOrigin(clientpos);
    
TE_SetupExplosion(posg_sprite5.0101005000);
    
TE_SendToAll();

__________________
sorry, for my poor english.
mcpan313 is offline
Send a message via MSN to mcpan313
Dr. Greg House
Professional Troll,
Part-Time Asshole
Join Date: Jun 2010
Old 02-24-2012 , 19:07   Re: TE_SetupExplosion: Sprite is not loaded correctly
Reply With Quote #7

Still the same issue. oO

Code:
/* Plugin Template generated by Pawn Studio */

#include <sourcemod>
#include <sdktools>

public Plugin:myinfo = 
{
    name = "New Plugin",
    author = "PP(R)TH: Dr. Gregory House",
    description = "<- Description ->",
    version = "1.0",
    url = "<- URL ->"
}

public OnPluginStart()
{
    RegConsoleCmd("sm_test", test);
}

new g_sprite;
public OnMapStart()
{
    // "materials/sprites/glow01.vmt"
    // "materials/sprites/laserbeam.vmt"
    g_sprite = PrecacheModel("materials/sprites/halo01.vmt");
}

public Action:test(client, args)
{
    decl Float:pos[3];
    GetClientAbsOrigin(client, pos);
    TE_SetupExplosion(pos, g_sprite, 5.0, 1, 0, 100, 5000);
    TE_SendToAll();
    PrintToChatAll("test used");
}
Dr. Greg House is offline
alongub
Veteran Member
Join Date: Aug 2009
Location: Israel
Old 02-24-2012 , 19:10   Re: TE_SetupExplosion: Sprite is not loaded correctly
Reply With Quote #8

Try again with a different material. That file might be corrupted or not available.

Last edited by alongub; 02-24-2012 at 19:15.
alongub is offline
Dr. Greg House
Professional Troll,
Part-Time Asshole
Join Date: Jun 2010
Old 02-24-2012 , 19:12   Re: TE_SetupExplosion: Sprite is not loaded correctly
Reply With Quote #9

GCFScape log:
Code:
C:\Program Files (x86)\Steam\SteamApps\common\left 4 dead 2\left4dead2\pak01_dir.vpk loaded.
Search for 'halo01' returned 0 results.
Which file should I test?
Dr. Greg House is offline
alongub
Veteran Member
Join Date: Aug 2009
Location: Israel
Old 02-24-2012 , 19:16   Re: TE_SetupExplosion: Sprite is not loaded correctly
Reply With Quote #10

Try this one:

Code:
sprites/sprite_fire01.vmt

Last edited by alongub; 02-24-2012 at 19:17.
alongub is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:51.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode