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

Help with sprites


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
safetymoose
Senior Member
Join Date: Feb 2015
Old 06-27-2016 , 07:01   Help with sprites
Reply With Quote #1

Hey everone,

So i'm working with sprites and i need a bit of help. Up until now i've been using the TE_SPRAY message to send a bunch of sprites flying around.
PHP Code:
write_byte(TE_SPRAY)
write_coord(position.x)
write_coord(position.y)
write_coord(position.z)
write_coord(direction.x)
write_coord(direction.y)
write_coord(direction.z)
write_short(modelindex)
write_byte(count)
write_byte(speed)
write_byte(noise)
write_byte(rendermode
I love the way these sprites bounce around, but i dont have any control over their duration and they dont register touch. I want to create a custom sprite entity that i can hook touch to, but i would like to send it flying like the TE_SPRAY message does. Anyone have an idea how i can achieve that bounce effect?

I've tried a bunch of different movetypes but they all pretty much got stuck to the wall, except for the movetype_bounce which sent it flying chaotically, bouncing all over the place...

Any ideas?

Last edited by safetymoose; 06-27-2016 at 07:05.
safetymoose is offline
SpannerSpammer
Member
Join Date: Mar 2006
Old 06-28-2016 , 03:28   Re: Help with sprites
Reply With Quote #2

..Try a different Effect where you can control the sprite used and the duration of the
effect like TE_SPRITETRAIL. (This is the effect Half-Life uses for the glowing ball sprites
that the Gauss Gun creates when it's fired.
__________________
[NeoTF|DEV]SpannerSpammer-[AoE]-
NeoTF Development Team.
http://steamcommunity.com/groups/neotf
SpannerSpammer is offline
safetymoose
Senior Member
Join Date: Feb 2015
Old 06-28-2016 , 14:59   Re: Help with sprites
Reply With Quote #3

It doesn't serve the purpose. I need to give my custom sprite entity the same movement as the sprites in these 2 effects, having them bounce off the wall like that. I want the entity to bounce off the walls and floor, but i dont like the movetype_bounce because it reflects the full velocity and the entity is literally bouncing around the whole map. How can i make it so when the entity hits a surface it bounces back a little bit instead of getting stuck on the surface?
safetymoose is offline
safetymoose
Senior Member
Join Date: Feb 2015
Old 06-28-2016 , 15:56   Re: Help with sprites
Reply With Quote #4

edit: I figured out how to achieve the effect.

I set the entity to MOVETYPE_BOUNCE, and i reduced the velocity on each touch.

Last edited by safetymoose; 06-28-2016 at 16:12.
safetymoose is offline
safetymoose
Senior Member
Join Date: Feb 2015
Old 06-28-2016 , 18:18   Re: Help with sprites
Reply With Quote #5

It's not as good as i thought, so i'll just stick to TE_SPRAY....
safetymoose 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 13:26.


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