Raised This Month: $ Target: $400
 0% 

Sprite show delay


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
~Ice*shOt
Veteran Member
Join Date: Mar 2009
Location: Lithuania
Old 03-25-2012 , 04:42   Sprite show delay
Reply With Quote #1

How i can change sprite show time, like in write_byte or etc?
I'm using this code:

Code:
public set_sprite(pOrigin[3], sprite, radius)
{
    message_begin(MSG_BROADCAST, SVC_TEMPENTITY, pOrigin)
    write_byte(TE_EXPLOSION)
    write_coord(pOrigin[0])
    write_coord(pOrigin[1])
    write_coord(pOrigin[2])
    write_short(sprite)
    write_byte(radius)
    write_byte(15)
    write_byte(4)
    message_end()
}
P.S. I don't want use set_task
~Ice*shOt is offline
Send a message via Skype™ to ~Ice*shOt
t3hNox
Senior Member
Join Date: Oct 2009
Old 03-25-2012 , 05:28   Re: Sprite show delay
Reply With Quote #2

I might be wrong but you cannot change how long a sprite will be shown without sending this message several times (according to your needs). Although you can change the frame rate but it can make a sprite look weird.
write_* parameters are (from ./scripting/include/message_const.inc) :
Code:
#define	TE_EXPLOSION                3        // Additive sprite, 2 dynamic lights, flickering particles, explosion sound, move vertically 8 pps
// write_byte(TE_EXPLOSION)
// write_coord(position.x)
// write_coord(position.y)
// write_coord(position.z)
// write_short(sprite index)
// write_byte(scale in 0.1's)
// write_byte(framerate)
// write_byte(flags)

Last edited by t3hNox; 03-25-2012 at 05:29.
t3hNox 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 11:03.


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