Ent Thinking
I'm trying to elminate the need for set_tasks in my mod and read
http://forums.alliedmods.net/showthread.php?t=43049 And now I ended up with this in my mod. PHP Code:
But the problem is that it changes the lights too fast and spams the wave file and just overloads the server. |
Re: Ent Thinking
Check to see if the classname is equal to "zswarm_lights" in the lightning_effects function. If it is equal, then do your thunder claps.
The reason it is spamming the server is because all the other entities using the think are activating the thunder. |
Re: Ent Thinking
Okay
I did what you said and got this now PHP Code:
This time it doesn't do anything if I set the cvar to 1. The lighting stays the same as the cvar before it. But one thing I accomplished with this is that it changes the lighting instantly which was one of my goals... I change the cvar to 0 and it goes to normal lightning. Then I try to change it to 1 but it stays the same as normal lighting and I wait for 20 seconds but nothing changed. Then I changed to cvar 2 and it went to lighting b. Tried to change it to cvar 1 again but stayed on lighting b. |
Re: Ent Thinking
I really didn't understand 100% what your code was trying to do. I assumed it was trying to make a lightning effect with the lights and a thunder clap sound.
If that is what you want then compile the following code to see what it does, then modify your plugin from there. I had a lot of fun writing this :P It started as me editing your code to work, but I got carried away, heh. Note: The way I set it up you can easily add more lightning flash effects. PHP Code:
|
Re: Ent Thinking
Huh, this is awsome. Works fine...the effect is cool :D
|
Re: Ent Thinking
Just tested and WOW factor is like 10/10 for me.
Thats like the real thing! I would love to use this for my mod as this is a lot more better than my original one! So can I hlstriker? |
Re: Ent Thinking
Why couldn't you? I made it for you :)
EDIT: Note that you might want to change... new lightStyleChar[3][2] = { "a", "b", "m" }; to... new lightStyleChar[3][2] = { "a", "b", "c" }; I like that better so it doesn't make it so bright. |
Re: Ent Thinking
the problem is set_pev(iEnt, pev_nextthink, 10.0), its gonna think every frame after 10.0, lol hawk
needs to be set_pev(iEnt, pev_nextthink, halflife_time()+10.0) |
Re: Ent Thinking
That wasn't the only problem. I think by the code I posted he can figure out what was wrong with his.
|
| All times are GMT -4. The time now is 11:09. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.