AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to make 700 sprites visible all over the map??? (https://forums.alliedmods.net/showthread.php?t=263567)

z0mbiland 05-28-2015 05:36

How to make 700 sprites visible all over the map???
 
Hello,

I want to make a sprite effect with 700 sprites all over the map at the same time.

I need a code to make all sprites visible because not all of this will be appear. I want to ignore a function of invisibility somehow.

I need a answer just for this!

.Dare Devil. 05-28-2015 10:36

Re: How to make 700 sprites visible all over the map???
 
Depends what those sprites are.
Here are limits that are hardcoded client side:
256 entities can be rendered in one screen ( entities can be sprites/models )
512 temp entities, they can be models and sprites yet there is less control over them.

Tell me exactly what effect does, i'll tell you then if it can be done or not and
if it can be done then i shall show you a code hint.

z0mbiland 05-28-2015 11:10

Re: How to make 700 sprites visible all over the map???
 
Quote:

Originally Posted by .Dare Devil. (Post 2302036)
Depends what those sprites are.
Here are limits that are hardcoded client side:
256 entities can be rendered in one screen ( entities can be sprites/models )
512 temp entities, they can be models and sprites yet there is less control over them.

Tell me exactly what effect does, i'll tell you then if it can be done or not and
if it can be done then i shall show you a code hint.

The effect will be a big bomb hidden on a map with a shield protection who kill all the players. The bomb will spread 700 sprites on the map when is planted! Players must search, destroy the shield and defuse it!

.Dare Devil. 05-28-2015 17:38

Re: How to make 700 sprites visible all over the map???
 
how are those sprites controlled?
Also you have to take account that about 100 entities will be for cs by default.

z0mbiland 05-28-2015 17:57

Re: How to make 700 sprites visible all over the map???
 
Quote:

Originally Posted by .Dare Devil. (Post 2302195)
how are those sprites controlled?
Also you have to take account that about 100 entities will be for cs by default.

Will be a TE_SPRITETRAIL stock, i will hook C4!
Do you have a code hint?

https://forums.alliedmods.net/showthread.php?t=54117

Orangutanz did it but he not provide a working example!
"There doesn't seem to be a cap limit either I had over 10,000 entities."

.Dare Devil. 05-29-2015 08:40

Re: How to make 700 sprites visible all over the map???
 
Even by changing the maximum amount of how many entities server can handle, you can't
change how many of them can be visible at once.

You just try that TE_SPRITETRAIL message out and see how many particles it allows.

If you know how blockmaker mod works then i edited that mod so you could have much much more block
entities.

All special blocks were entities and normal blocks where displayed with TE_PROJECTILE message
so i was able to have 512 normal blocks + 255 - ( player, w weapon, map entity's models that were visible )


Btw, be sure that you don't send too many messages at one server frame.
Other ways there will going to be problem. Problem may not appear if you test alone but when
there are players then player's client would crash.

z0mbiland 05-29-2015 12:36

Re: How to make 700 sprites visible all over the map???
 
Quote:

Originally Posted by .Dare Devil. (Post 2302367)
Even by changing the maximum amount of how many entities server can handle, you can't
change how many of them can be visible at once.

You just try that TE_SPRITETRAIL message out and see how many particles it allows.

If you know how blockmaker mod works then i edited that mod so you could have much much more block
entities.

All special blocks were entities and normal blocks where displayed with TE_PROJECTILE message
so i was able to have 512 normal blocks + 255 - ( player, w weapon, map entity's models that were visible )


Btw, be sure that you don't send too many messages at one server frame.
Other ways there will going to be problem. Problem may not appear if you test alone but when
there are players then player's client would crash.

I don't know how the block makers works - this is your code hint?! What you say about orpheu?
What function pass the visibility to integrate in TE_SPRITETRAIL stock?

engine.inc
is_visible
native is_visible(entity, target);

engine_stocks.inc
get_entity_visibility
stock get_entity_visibility(entity)
Returns 1 if entity is visible.

engine_stocks.inc
set_entity_visibility
stock set_entity_visibility(entity, visible = 1)
If visible = 1, entity will be set to be visible, else invisible.


fakemeta_util.inc
fm_is_ent_visible
stock bool:fm_is_ent_visible(index, entity, ignoremonsters = 0) {

fakemeta_util.inc
fm_is_visible
stock bool:fm_is_visible(index, const Float:point[3], ignoremonsters = 0) {

xs.inc
xs_freevisibleslots
stock bool:xs_freevisibleslots(num)

.Dare Devil. 05-29-2015 17:46

Re: How to make 700 sprites visible all over the map???
 
You can't change the limit that how many visible models/sprites there can be.
How can't you understand it?

The visibility is handled on client side. There no way to access client side.

fysiks 05-29-2015 18:00

Re: How to make 700 sprites visible all over the map???
 
I've tried to display only a fraction of what you are requesting and they still didn't all show up. Graphics is handled client-side so you can't really do anything about it.

z0mbiland 05-30-2015 01:59

Re: How to make 700 sprites visible all over the map???
 
Quote:

Originally Posted by fysiks (Post 2302539)
I've tried to display only a fraction of what you are requesting and they still didn't all show up. Graphics is handled client-side so you can't really do anything about it.

I found something.
I start a server in my pc, I set unlimited ammo, ak47, fy_snow map, ALONE in the map, i play with speed cheat.

After shooting with speed this error appear:

Sentence or Pitch shift ignored. > 16 playing!
Sentence or Pitch shift ignored. > 16 playing!
Sentence or Pitch shift ignored. > 16 playin

I find the real error source!


[IMG]http://s8.************/7bigl4ps5/ENTITY.jpg[/IMG]

What i want to do to fix all of this!

Let's take a TE_SPRITETRAIL and give him a task. 10 sprites at every 3 seconds. the sprites will have the life of 7.

when task 1 is on the ground, delete task 1 sprites to start the task 2.
when task 2 is on the ground, delete task 2 sprites to start the task 3.

What i want is TO NOT OVERLAP task 1 to task2 ...


All times are GMT -4. The time now is 01:16.

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