NS - Simulating Spores/Umbra
Basically what I'm trying to do is to make the onos release a cloud of spores around himself every two seconds while he is digesting. Problem I'm having is the damage of the spores.
It would be easier if I could just call all of this in one function: create the spores and make them last for 7 seconds, do damage to all players within the defined radius for the same number of seconds the spores appear. It's pretty much identical as if a lerk was shooting spores at an onos every two seconds. I have the code for the spores effect and the damage, but not the timing. How do I simulate spores as if the lerk has just fired a spore? I have an idea of how to create the effect and do damage but the damage is only done once every time the effect is simulated, instead of : every second do damage for seven seconds like when a lerk does it. I was looking at the sporemines plugin, it had what I needed but I was having trouble implementing it. Here's what I got so far for drawing spores wherever the player(id) is: Code:
After I call the spore visual effects, I then call another function to do damage to all the player's within the defined range. The problem I'm having is how to keep the damage to keep on damaging for a certain number of seconds (the length of time the spores appear). The part in sporemines I need, is when the player triggers the mine and causes it to release spores. Thanks |
Code:
|
Thanks for the tip. I'm having a problem in-game with invalid player. I've been able to fix it by checking if user is connected but then it doesn't do damage. It keeps saying this:
Code:
L 03/16/2005 - 16:18:31: [Engine] Invalid player 0 (not in-game) |
You are checking with is_valid_ent(i) . Use is_user_connected(i) and that should fix it up.
Also, parms[1] is the Y value of the origin, not the full origin vector. |
Alright figured it out. 8) BTW, do you know how I would simulate umbra? I don't really know how to use the playback_event function. :( Generally I'd post NS questions in the modns.org forums, but they're down right now... :?
|
| All times are GMT -4. The time now is 13:59. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.