Raised This Month: $32 Target: $400
 8% 

Solved Animated Sprite Entity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AnimalMonster
Senior Member
Join Date: May 2020
Old 05-24-2023 , 11:41   Animated Sprite Entity
Reply With Quote #1

Hey, i've been trying for the past hour to figure out why doesn't my entity animate...
PHP Code:
new fire rg_create_entity("env_sprite");
        
playerFireent ] = fire;
        
set_entvar(firevar_spawnflagsSF_SPRITE_STARTON);
        
set_entvar(firevar_framerate30.0);
        
set_entvar(firevar_animtimeget_gametime());
        
set_entvar(firevar_modelszSpritesSprite_Flame ]);
        
set_entvar(firevar_modelindexgszSpriteSprite_Flame ]);
        
set_entvar(firevar_ownerattacker);
        
set_entvar(firevar_enemyent);
        
set_entvar(firevar_scale0.5);
        
set_entvar(firevar_aimentent);
        
set_entvar(firevar_movetypeMOVETYPE_FOLLOW);
        
set_entvar(firevar_iuser2floatroundflTime flRate ) );
        
set_entvar(firevar_rendermodekRenderTransAdd );
        
set_entvar(firevar_renderamt255.0);
        
set_entvar(firevar_originflOrigin);
        
dllfunc(DLLFunc_Spawnfire);
        
SetThink(fire"FireThink");
        
set_entvar(firevar_nextthinkget_gametime()); 
I've looked on other threads but none helped

Last edited by AnimalMonster; 05-28-2023 at 09:28.
AnimalMonster is offline
asdian
Member
Join Date: Sep 2016
Location: Indonesia
Old 05-25-2023 , 11:14   Re: Animated Sprite Entity
Reply With Quote #2

afaik you need to set frame++ on think

since you are using rg/reapi i can't help you much bcse i never use that
asdian is offline
AnimalMonster
Senior Member
Join Date: May 2020
Old 05-26-2023 , 11:58   Re: Animated Sprite Entity
Reply With Quote #3

First of all, it ain't that different REHLDS from the original when it comes to functionality.
Second of all, i should have showed all the work since it was because i hooked and used the Think and Animation comes in the same think so i kind of was overriding
AnimalMonster is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 05-27-2023 , 08:21   Re: Animated Sprite Entity
Reply With Quote #4

Spawn flag is required.
__________________
DJEarthQuake is offline
AnimalMonster
Senior Member
Join Date: May 2020
Old 05-28-2023 , 09:29   Re: Animated Sprite Entity
Reply With Quote #5

Solved: I was using Think for something else while the game was trying to animate using the same think. Think override.
AnimalMonster 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 17:20.


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