Raised This Month: $ Target: $400
 0% 

Dropping an entity(sprite) on a specific origin from the sky !


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
byetovice
Senior Member
Join Date: Nov 2009
Location: Turkey
Old 05-19-2012 , 14:20   Dropping an entity(sprite) on a specific origin from the sky !
Reply With Quote #1

Hi guys,
I'm trying to make a plugin that will drop a sprite falling from the sky to an origin. Like a shower.
Let's say abc.spr, i have the origin and i add 2000 to origin[2] to find the position in the sky.
But i couldn't make a sprite falling to the origin. Can you please help me giving me a code?

Thanks..
__________________
Working on mods..
byetovice is offline
usaexelent
Senior Member
Join Date: Nov 2009
Location: Lithuania
Old 05-19-2012 , 14:24   Re: Dropping an entity(sprite) on a specific origin from the sky !
Reply With Quote #2

Trace line from the origin, then create ent and set entitys model to your sprite, if theres alot of entitys that you want to create then I think that you can do it with message_begin and particles.

Last edited by usaexelent; 05-19-2012 at 14:25.
usaexelent is offline
Send a message via Skype™ to usaexelent
byetovice
Senior Member
Join Date: Nov 2009
Location: Turkey
Old 05-19-2012 , 14:31   Re: Dropping an entity(sprite) on a specific origin from the sky !
Reply With Quote #3

yes i want to create many sprites falling from the sky. can you give me a basic example of using message_begin to do that?
__________________
Working on mods..
byetovice is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 05-19-2012 , 14:33   Re: Dropping an entity(sprite) on a specific origin from the sky !
Reply With Quote #4

That would be really laggy and could crash the server.
__________________
<VeCo> is offline
byetovice
Senior Member
Join Date: Nov 2009
Location: Turkey
Old 05-19-2012 , 14:34   Re: Dropping an entity(sprite) on a specific origin from the sky !
Reply With Quote #5

does it slow down a lot? just wanna make a shower of a special sprite
__________________
Working on mods..
byetovice is offline
usaexelent
Senior Member
Join Date: Nov 2009
Location: Lithuania
Old 05-19-2012 , 15:54   Re: Dropping an entity(sprite) on a specific origin from the sky !
Reply With Quote #6

This is not so laggy as you think, because about 10-20 particles don't do a lot of lagg, but if theres 100+ then it can make a bit of lagg
__________________
and once again

Last edited by usaexelent; 05-19-2012 at 16:08.
usaexelent is offline
Send a message via Skype™ to usaexelent
byetovice
Senior Member
Join Date: Nov 2009
Location: Turkey
Old 05-19-2012 , 16:34   Re: Dropping an entity(sprite) on a specific origin from the sky !
Reply With Quote #7

But how ? how can i do that ?
__________________
Working on mods..
byetovice is offline
usaexelent
Senior Member
Join Date: Nov 2009
Location: Lithuania
Old 05-19-2012 , 17:21   Re: Dropping an entity(sprite) on a specific origin from the sky !
Reply With Quote #8

#define TE_PARTICLEBURST 122 // Very similar to lavasplash
// write_byte(TE_PARTICLEBURST)
// write_coord(origin)
// write_short(radius)
// write_byte(particle color)
// write_byte(duration * 10) (will be randomized a bit)

or

#define TE_BREAKMODEL 108 // Box of models or sprites
// write_byte(TE_BREAKMODEL)
// write_coord(position.x)
// write_coord(position.y)
// write_coord(position.z)
// write_coord(size.x)
// write_coord(size.y)
// write_coord(size.z)
// write_coord(velocity.x)
// write_coord(velocity.y)
// write_coord(velocity.z)
// write_byte(random velocity in 10's)
// write_short(sprite or model index)
// write_byte(count)
// write_byte(life in 0.1 secs)
// write_byte(flags)

I think you could use this
__________________
and once again

Last edited by usaexelent; 05-19-2012 at 18:01.
usaexelent is offline
Send a message via Skype™ to usaexelent
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 05-20-2012 , 06:43   Re: Dropping an entity(sprite) on a specific origin from the sky !
Reply With Quote #9

I thought he want to make something like a rain effect. But if he want it to do it only in a specific place, then he can use TE_SPRITETRAIL:

PHP Code:
#define TE_SPRITETRAIL              15       // Line of moving glow sprites with gravity, fadeout, and collisions
// write_byte(TE_SPRITETRAIL)
// write_coord(startposition.x)
// write_coord(startposition.y)
// write_coord(startposition.z)
// write_coord(endposition.x)
// write_coord(endposition.y)
// write_coord(endposition.z)
// write_short(sprite index)
// write_byte(count)
// write_byte(life in 0.1's) 
// write_byte(scale in 0.1's) 
// write_byte(velocity along vector in 10's)
// write_byte(randomness of velocity in 10's) 
__________________
<VeCo> is offline
byetovice
Senior Member
Join Date: Nov 2009
Location: Turkey
Old 05-20-2012 , 10:01   Re: Dropping an entity(sprite) on a specific origin from the sky !
Reply With Quote #10

Ok guys. solved. I wanted to make a shower of fire balls , or rockets..
For rocket, it was ok, but for a flame shower, i had to use sprites as the models of the entities falling from the sky.
The problem was that i could see the blackparts that were supposted to be transparent.

Veco is right, it is so laggy. The thing that makes it laggy is that you have to find a origin just under the skybox.
For each entity, it slows down the game and your server.
__________________
Working on mods..
byetovice 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 00:30.


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