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

Sprite Duration


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Copper
Senior Member
Join Date: Feb 2012
Location: California
Old 05-08-2017 , 03:08   Sprite Duration
Reply With Quote #1

I'm trying to figure out how I can make the sprite's duration a little longer but I am not sure how to do that. Can anyone explain. Thanks

PHP Code:
public show_sprite(iKillerdoublenade_kill)
{  
    if(!
is_user_connected(iKiller))
    return 
PLUGIN_CONTINUE
     
    
static origin[3]
    
get_user_origin(iKillerorigin)
     
    
message_begin(MSG_PVSSVC_TEMPENTITYorigin)
    
write_byte(TE_SPRITE)
    
write_coord(origin[0])
    
write_coord(origin[1])
    
write_coord(origin[2]+65)
    
write_short(doublenade_kill)
    
write_byte(10)
    
write_byte(250)
    
message_end()
     
    return 
PLUGIN_CONTINUE

Copper is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 05-08-2017 , 03:46   Re: Sprite Duration
Reply With Quote #2

Code:
#define TE_SPRITE                   17       // Additive sprite, plays 1 cycle // write_byte(TE_SPRITE) // 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(brightness)

Last edited by Craxor; 05-08-2017 at 03:46.
Craxor is offline
Send a message via ICQ to Craxor
Copper
Senior Member
Join Date: Feb 2012
Location: California
Old 05-08-2017 , 03:48   Re: Sprite Duration
Reply With Quote #3

Quote:
Originally Posted by Craxor View Post
Code:
#define TE_SPRITE                   17       // Additive sprite, plays 1 cycle // write_byte(TE_SPRITE) // 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(brightness)
I'm not 100% sure what the 17 means on #define TE_SPRITE. Care to explain a little more.
Copper is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 05-08-2017 , 03:51   Re: Sprite Duration
Reply With Quote #4

For your answer i believe it means that you can't change the sprite duration, it will play the animation itself and then will dissapear.
Craxor is offline
Send a message via ICQ to Craxor
Copper
Senior Member
Join Date: Feb 2012
Location: California
Old 05-08-2017 , 03:55   Re: Sprite Duration
Reply With Quote #5

Quote:
Originally Posted by Craxor View Post
For your answer i believe it means that you can't change the sprite duration, it will play the animation itself and then will dissapear.
So if I can't change the sprite duration, is there another way I could do this?
Copper is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 05-08-2017 , 04:09   Re: Sprite Duration
Reply With Quote #6

I never played with sprites, just give a look here and test them as you can.
Craxor is offline
Send a message via ICQ to Craxor
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 05-08-2017 , 07:21   Re: Sprite Duration
Reply With Quote #7

I think you can edit sprite and increase count of frames.
__________________
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
Natsheh
Veteran Member
Join Date: Sep 2012
Old 05-08-2017 , 12:05   Re: Sprite Duration
Reply With Quote #8

Have you tried increasing the scales?
PHP Code:
   message_begin(MSG_PVSSVC_TEMPENTITYorigin
    
write_byte(TE_SPRITE
    
write_coord(origin[0]) 
    
write_coord(origin[1]) 
    
write_coord(origin[2]+65
    
write_short(doublenade_kill
    
write_byte(50//  scaling from 1 to 5 times
    
write_byte(250
    
message_end() 
Or use this effect if you are trying to play a cyrcle

PHP Code:
/**
 * Screen aligned beam ring, expands to max radius over lifetime
 *
 * @note
 * write_byte(TE_BEAMTORUS)
 * write_coord(position.x)
 * write_coord(position.y)
 * write_coord(position.z)
 * write_coord(axis.x)
 * write_coord(axis.y)
 * write_coord(axis.z)
 * write_short(sprite index)
 * write_byte(starting frame)
 * write_byte(frame rate in 0.1's)
 * write_byte(life in 0.1's)
 * write_byte(line width in 0.1's)
 * write_byte(noise amplitude in 0.01's)
 * write_byte(red)
 * write_byte(green)
 * write_byte(blue)
 * write_byte(brightness)
 * write_byte(scroll speed in 0.1's)
 */
#define TE_BEAMTORUS                19 
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 05-08-2017 at 12:12.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Copper
Senior Member
Join Date: Feb 2012
Location: California
Old 05-08-2017 , 23:54   Re: Sprite Duration
Reply With Quote #9

Thanks for the help. I just decided to edit the sprite itself and make it longer.
Copper is offline
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 18:58.


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