Raised This Month: $ Target: $400
 0% 

change player model to sprite


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
47
Junior Member
Join Date: Jul 2004
Old 07-07-2004 , 20:06   change player model to sprite
Reply With Quote #1

is it posible to change a players model to a sprite?
i tried entity_set_model and using a sprite, but it crashed
47 is offline
Ryan
Senior Member
Join Date: May 2004
Location: NH, USA
Old 07-07-2004 , 21:54  
Reply With Quote #2

make the player invisible, then create a sprite at their origin. set the movetype to follow, and the aiment to the player

like so

Code:
public player_sprite( id, szSpriteName[] ) {     // make player invisible     entity_set_int( id, EV_INT_rendermode, kRenderTransTexture );     entity_set_float( id, EV_FL_renderamt, 0.0 );     // create sprite     new iPlayerSprite = create_entity( "info_target" );     entity_set_string( iPlayerSprite, EV_SZ_classname, "PLAYER_SPRITE" );     entity_set_model( iPlayerSprite, szSpriteName );     new Float:fOrigin[3];     entity_get_vector( id, EV_VEC_origin, fOrigin );     entity_set_origin( iPlayerSprite, fOrigin );     // set to follow player     entity_set_int( iPlayerSprite, EV_INT_movetype, MOVETYPE_FOLLOW );     entity_set_int( iPlayerSprite, EV_INT_solid, SOLID_NOT );     entity_set_edict( iPlayerSprite, EV_ENT_aiment, id );     return PLUGIN_HANDLED; }

since you're not removing the hitboxes, the player will still receive damage.
__________________
Warcraft 3: Expansion
Homepage | Downloads | Forums
Ryan is offline
Send a message via AIM to Ryan
Reply


Thread Tools
Display Modes

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 14:48.


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