I've already got the basic single shot spell down it goes like this
Event-Specific unit event-Rifleman 001 finishes casting an ability
Conditions-Ability being cast equal to (Rifleshot DUmmy) -Mana of (triggering unit) greater than 1 -Random integer from 1-1000 less than 999 Actions- If Random integer from 1-1000 greater than 999 Then-display message to owner of (triggering unit) Rifle has jammed. Else Order (Dummyunit001) to random point within (250) of target point of ability being cast Order triggering unit to (gunshotRifle)(dummyunit001)
The shot is based off of shockwave with a very thin AoE and final area so its more realistic like a bullet being shot.
2 questions: 1. How would i make this burst fire (cast 3 times) 2. how would i make this full fire (continuous until ammo runs out)
If you have to do it in JASS because its impossible with triggers, i cant do it myself, if its trigger based you can just explain it and i can implement it a.s.a.p.
Re: Gun shot spell-single shot, burst, and full fire
SpanEtherX09I've already got the basic single shot spell down it goes like this
Event-Specific unit event-Rifleman 001 finishes casting an ability
Conditions-Ability being cast equal to (Rifleshot DUmmy) -Mana of (triggering unit) greater than 1 -Random integer from 1-1000 less than 999 Actions- If Random integer from 1-1000 greater than 999 Then-display message to owner of (triggering unit) Rifle has jammed. Else Order (Dummyunit001) to random point within (250) of target point of ability being cast Order triggering unit to (gunshotRifle)(dummyunit001)
The shot is based off of shockwave with a very thin AoE and final area so its more realistic like a bullet being shot.
2 questions: 1. How would i make this burst fire (cast 3 times) 2. how would i make this full fire (continuous until ammo runs out)
If you have to do it in JASS because its impossible with triggers, i cant do it myself, if its trigger based you can just explain it and i can implement it a.s.a.p.
First of all, the trigger will never display it is jammed, BECAUSE you set a condition to run to be < 999, and then used an if > 999, which is impossible. Also change that < 999 to <= 999.
Now for your questions Burst fire, would simply mean creating 3 dummies and making them each fire out the spell
Full fire - I'm guessing you mean ammo as in mana? take 1 dummy and give it an insnaely high expiration timer (which you forgot to do in your trigger), something like 30 seconds then there are 2 ways to do this, the MUI (JASS) way and the GUI way. The gui way would use an if then else multiple actions in a loop, such as: for every integer a between 1 and (mana of casting unit) if mana is > 0 then set mana -1 (insert the cast single shot actions) else do nothing wait 0.1 seconds or something like that, it isn't very effeincent and you'd need to keep the dummy and caster in a variable.
the jass way is more complex and I currently don't have the time to post it. One of these other guys probably will.
i didnt remove dummy units b/c theres 1 dummy for each player since most of the spells i have require unit-specific triggers, such as throw grenade, and btw the jammed gun message does work O_O ty for ur help tho
SpanEtherX09i didnt remove dummy units b/c theres 1 dummy for each player since most of the spells i have require unit-specific triggers, such as throw grenade, and btw the jammed gun message does work O_O ty for ur help tho
Ahh I see what happened you are getting a random number twice. If it generates 1000 2nd time then it works. That Kinda makes your condition useless