AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   What code causes the light grenade to release sparkles? (https://forums.alliedmods.net/showthread.php?t=337708)

GlobalPlague 05-09-2022 08:27

What code causes the light grenade to release sparkles?
 
Hello. So, i would like to know what is the code that causes the light grenade to release sparkles, and which .spr file is the sparkles. I want to replace the sparkles with another effect, so i need to replace the .spr file that produces sparkles with the .spr file that produces the effect i want.

I made a video that shows what sparkles I'm talking about: https://www.youtube.com/shorts/eal4OQPv6mM

I found a .spr file that produces an effect that is similar to the following light effect: https://imgur.com/MXOjaJP

This effect will be put above the light grenade, after the grenade is thrown and turned on, making it look cool and realistic, especially when the fog effect is enabled in my ZPA server.

Here is the whole (default) code of ZPA 1.6.1: https://forums.alliedmods.net/showthread.php?t=118684

So, can someone check the .sma file and show me where is the code producing the sparkles, so i can edit it? I tried to find it by using keywords and Ctrl+F, but i didn't find any paths to .spr files.

Basically, i expected to find something like the following example:

Code:

g_sparks_gibs = precache_model("sprites/sparks.spr")
However, i didn't find anything like that.

I have two ideas about how to replace the sparkles with my .spr file. If you help me identify the name of the .spr file that produces the sparks, i can put the same name to the .spr file that produces the light effect, and then replace the spark .spr file with the light effect .spr file, without editing anything in the source code. The second idea is to simply edit the source code. I may know how to edit it, if i see the segment of the code responsible for the production of the sparks.

So, can someone help me identify the segment of the code that produces those sparkles?

CrazY. 05-09-2022 16:17

Re: What code causes the light grenade to release sparkles?
 
Code:
message_begin( MSG_PVS, SVC_TEMPENTITY, position ); write_byte( TE_SPARKS ); write_coord( position[0] ); write_coord( position[1] ); write_coord( position[2] ); message_end();

Craxor 05-10-2022 07:19

Re: What code causes the light grenade to release sparkles?
 
Crazy, wich part of your code changes the sprite?

OP you may give a try with this one: https://forums.alliedmods.net/showthread.php?t=250244

DJEarthQuake 05-15-2022 09:24

Re: What code causes the light grenade to release sparkles?
 
spark_shower


All times are GMT -4. The time now is 10:52.

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