Dropping an entity(sprite) on a specific origin from the sky !
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.. |
Re: Dropping an entity(sprite) on a specific origin from the sky !
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.
|
Re: Dropping an entity(sprite) on a specific origin from the sky !
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?
|
Re: Dropping an entity(sprite) on a specific origin from the sky !
That would be really laggy and could crash the server.
|
Re: Dropping an entity(sprite) on a specific origin from the sky !
does it slow down a lot? just wanna make a shower of a special sprite
|
Re: Dropping an entity(sprite) on a specific origin from the sky !
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
|
Re: Dropping an entity(sprite) on a specific origin from the sky !
But how ? how can i do that ?
|
Re: Dropping an entity(sprite) on a specific origin from the sky !
#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 |
Re: Dropping an entity(sprite) on a specific origin from the sky !
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:
|
Re: Dropping an entity(sprite) on a specific origin from the sky !
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. |
| All times are GMT -4. The time now is 00:30. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.