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:
public drawsmspores(id)
{
new Float:origin[3]
pev(id,pev_origin,origin)
emit_sound(id,CHAN_ITEM,song_spore,0.8,ATTN_NORM,0,PITCH_NORM)
playback_event(0,id,g_EventParticle,0.0,origin,Float:{0.0,0.0,0.0},0.0,0.0,13,0,0,0) //spore effect
}
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