Raised This Month: $44 Target: $400
 11% 

What code causes the light grenade to release sparkles?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GlobalPlague
Senior Member
Join Date: Feb 2016
Location: idk
Old 05-09-2022 , 09:27   What code causes the light grenade to release sparkles?
Reply With Quote #1

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?
GlobalPlague is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 05-09-2022 , 17:17   Re: What code causes the light grenade to release sparkles?
Reply With Quote #2

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();
__________________





Last edited by CrazY.; 05-09-2022 at 17:17.
CrazY. is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 05-10-2022 , 08:19   Re: What code causes the light grenade to release sparkles?
Reply With Quote #3

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
__________________
Project: Among Us

Last edited by Craxor; 05-11-2022 at 02:18.
Craxor is offline
Send a message via ICQ to Craxor
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 05-15-2022 , 10:24   Re: What code causes the light grenade to release sparkles?
Reply With Quote #4

spark_shower
__________________
DJEarthQuake is offline
Reply


Thread Tools
Display Modes

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 15:00.


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