AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Sprite: pSprite has no frames!!! (https://forums.alliedmods.net/showthread.php?t=108687)

xbatista 11-08-2009 06:39

Sprite: pSprite has no frames!!!
 
That prints me to client console:
Quote:

Sprite: pSprite has no frames!!!
It's the only one code I'm using with entities:
PHP Code:

public Set_Sprite_Task(id, const sprite[], Float:scaleistaskFloat:task_time, const classname[])
{
    new 
sprite_ent create_entity("env_sprite")

    
entity_set_string(sprite_entEV_SZ_classnameclassname)
    
entity_set_int(sprite_entEV_INT_movetypeMOVETYPE_FOLLOW)
    
entity_set_edict(sprite_entEV_ENT_aimentid );
    
entity_set_model(sprite_entsprite)

    
entity_set_intsprite_entEV_INT_rendermodekRenderTransAdd)
    
entity_set_floatsprite_entEV_FL_renderamt200.0 )
    
    
entity_set_floatsprite_entEV_FL_framerate25.0 )
    
entity_set_floatsprite_entEV_FL_scalescale )
    
entity_set_intsprite_entEV_INT_spawnflagsSF_SPRITE_STARTON)
    
DispatchSpawnsprite_ent )

    if ( 
istask )
    {
        
set_task(task_time"End_Sprite_Task"sprite_ent);
    }
}
public 
End_Sprite_Task(sprite_ent)
{
    if ( 
pev_valid(sprite_ent) )
    {
        
remove_entity(sprite_ent);
    }


Whats wrong?

Sprite I'm using: fexplo.spr

Arkshine 11-08-2009 06:53

Re: Sprite: pSprite has no frames!!!
 
use EngFunc_SetModel directly or use pev_model + pev_modelindex. When you spawn the number of frames is got using modelindex.

xbatista 11-08-2009 07:02

Re: Sprite: pSprite has no frames!!!
 
But whats wrong with
PHP Code:

entity_set_model(sprite_entsprite

?
Why this will work ?
EngFunc_SetModel

Arkshine 11-08-2009 07:18

Re: Sprite: pSprite has no frames!!!
 
Ah you're right, it's the same.

Are you sure you're using the right sprite ?

Jon 11-08-2009 08:01

Re: Sprite: pSprite has no frames!!!
 
PHP Code:

entity_set_floatsprite_entEV_FL_framerate25.0 

A shot in the dark but try 1.0.

xbatista 11-08-2009 08:32

Re: Sprite: pSprite has no frames!!!
 
I'm using default fexplo.spr from valve

1.0? It will play then slowly

ConnorMcLeod 11-08-2009 11:05

Re: Sprite: pSprite has no frames!!!
 
entity_set_model(sprite_ent, sprite) is fine, but you would have to send it after spawn.

Try to use entity_set_string(, EV_SZ_model, ) before you spawn the sprite and it should be enough.

xbatista 11-08-2009 11:55

Re: Sprite: pSprite has no frames!!!
 
Ok will try, but that shit prints unknown when.. in random sometimes ( I mean that message for client )

fysiks 11-08-2009 16:42

Re: Sprite: pSprite has no frames!!!
 
Oddly, I saw this same thing on my clan's server (Day of Defeat).

happy_2012 12-11-2014 12:56

Re: Sprite: pSprite has no frames!!!
 
I am using Zombie Plague (Assassins vs Snipers)
When I connect to the server it shows this message to me:
PHP Code:

Sprite:  no pSprite!!!
Sprite:  no pSprite!!!
Sprite:  no pSprite!!!
Sprite:  no pSprite!!!
Sprite:  no pSprite!!! 

Usually it does not show round time :/


All times are GMT -4. The time now is 17:33.

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