AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   Adding lightning + sound to slay (https://forums.alliedmods.net/showthread.php?t=97085)

bobbobagan 07-12-2009 10:30

Adding lightning + sound to slay
 
1 Attachment(s)
Hey all,

I have been attempting to modify slay.sp to add lightning + sound. I have taken the lightning effects and sound from the Uberpunisher plugin (http://forums.alliedmods.net/showthread.php?t=58660), and tried to add it in.

I managed to get the plugin to compile, but it only plays the sound... no lightning effect. See the attached slay.sp to see what I have done.

Does anybody know what I am doing wrong here?

Regards,

Bobbobagan

bobbobagan 07-14-2009 00:01

Re: Adding lightning + sound to slay
 
Bump. Please help me!

bobbobagan 07-31-2009 03:34

Re: Adding lightning + sound to slay
 
bump again :D

TESLA-X4 07-31-2009 03:39

Re: Adding lightning + sound to slay
 
That's because you're setting up the TempEnts, but not sending them.
Code:

    TE_SetupBeamPoints(toppos, playerpos, g_Lightning, g_Lightning, lightningstartframe, lightningframerate, lightninglife, lightningwidth, lightningendwidth, lightningfadelength, lightningamplitude, lightningcolor, lightningspeed);
    TE_SetupExplosion(playerpos, g_ExplosionFire, 10.0, 10, TE_EXPLFLAG_NONE, 200, 255);
    TE_SetupSmoke(playerpos, g_Smoke1, smokescale, smokeframerate);
    TE_SetupSmoke(playerpos, g_Smoke2, smokescale, smokeframerate);
    TE_SetupMetalSparks(sparkstart,sparkdir);


    TE_SendToAll(0.0);

In effect, you only sent the last one (MetalSparks).
It should be:
PHP Code:

    TE_SetupBeamPoints(topposplayerposg_Lightningg_Lightninglightningstartframelightningframeratelightninglifelightningwidthlightningendwidthlightningfadelengthlightningamplitudelightningcolorlightningspeed);
    
TE_SendToAll();
    
TE_SetupExplosion(playerposg_ExplosionFire10.010TE_EXPLFLAG_NONE200255);
    
TE_SendToAll();
    
TE_SetupSmoke(playerposg_Smoke1smokescalesmokeframerate);
    
TE_SendToAll();
    
TE_SetupSmoke(playerposg_Smoke2smokescalesmokeframerate);
    
TE_SendToAll();
    
TE_SetupMetalSparks(sparkstart,sparkdir);
    
TE_SendToAll(); 


retsam 07-31-2009 07:03

Re: Adding lightning + sound to slay
 
Someone has actually done a separate plugin already that does this, might check it out..

http://forums.alliedmods.net/showthr...=admin+thunder


All times are GMT -4. The time now is 00:03.

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