| 07-14-2004, 04:29 AM | #1 |
Ive been recreating Sim Packs from starcraft, heres what ive got so far: Code:
Events
Unit - A unit Begins casting an ability
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Ability being cast) Equal to Stim Packs
(Ability being cast) Equal to Stim Packs (Full)
Then - Actions
Unit Group - Pick every unit in (Units within 600.00 of (Position of (Casting unit)) matching ((Owner of (Matching unit)) Equal to (Owner of (Casting unit)))) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) is Mechanical) Equal to False
(Unit-type of (Picked unit)) Not equal to Medic
(Life of (Picked unit)) Greater than or equal to 101.00
((Picked unit) has buff Stim Packs) Equal to False
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Ability being cast) Equal to Stim Packs
Then - Actions
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - 100.00)
Unit - Add Stim Packs (Effect) to (Picked unit)
Wait (5.00 + (Real((Level of Stim Packs for (Casting unit))))) seconds
Unit - Remove Stim Packs (Effect) from (Picked unit)
Else - Actions
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - 100.00)
Unit - Add Stim Packs (Effect) to (Picked unit)
Wait 10.00 seconds
Unit - Remove Stim Packs (Effect) from (Picked unit)
Else - Actions
Else - Actions
The ability adds alright, but will not remove when the time is up. Note: There are two diffferent abilities of the same effect, the non (full) version has five levels, thus the wait 5sec + (level of ability). Any ideas why it wont remove once the time is up? |
| 07-14-2004, 02:06 PM | #2 |
Can't you just base the ability of berserk instead, since it gives a boost in attack and movement speed, then you can just trigger the life loss, of course, this solution has the problem that you can kill units using stim pack, unless you fix a way to trigger that. |
| 07-14-2004, 03:25 PM | #3 |
Eh, I dunno zotax, I've been told that using triggers to add a buff effect to a unit does exactly zilch. Also, the "picked unit" reference disappears the instant another unit is picked ANYWHERE in the map. You will have to use some kind of local variable if you insist on using triggers for that because you really should just use berserk for this. |
| 07-14-2004, 04:16 PM | #4 |
Hold it right there, you have a loop (pick every unit and do stuff) and a wait together. This means the trigger will pick the first unit, give it the ability, wait some time, take away the ability and then repeat this for the next unit. It would only give out a single stimpack every 10 seconds, not all at once. Instead of that, you should use dummy casters to cast a modified bloodlust on all units around, the buff will run out on it's own. Either that, or first pick all units and give them the stimpack, and also add them to a unitgroup variable, and then, after 10 seconds, remove stim from all units in that variable. |
| 07-14-2004, 09:37 PM | #5 |
Thanks for the help Antiraf, dunno how I didnt notice I guess I dont see pick unit as a real loop. As for using beserk it wont really fit the purpse, as beserk multiplies the damage you take, as opposed to stim pakcs whihc is - health regardless. |
| 07-15-2004, 04:56 AM | #6 |
You could just set the damage multiplier for berserk to 1... that way it would'nt have any effect beyond attack speed. But bloodlust serves just as well. |
| 07-15-2004, 05:37 AM | #7 |
There's also the quilbeast's frenzy which is nothing but a self targeting bloodlust. |
| 07-15-2004, 08:36 AM | #8 |
I mean that stimpacks takes away 10 health whether you get hit or not, whereas frenzy and beserk make you take extra damage when you get hit. Also the spells need to be AOE, so i really need triggers for it to work. |
| 07-15-2004, 02:53 PM | #9 |
Yes, without doubt, you do need triggers, but adding abilities with triggers (which have to be removed afterwards) is much more annoying than using dummy casters with triggers, because those leave a buff that gets removed by itself. Naturally, you still need the triggers to get the life loss/cast on multiple units, you just get the spell effect differently. Oh, and frenzy doesn't cause higher damage received, only berserk does that. |
| 07-15-2004, 03:10 PM | #10 |
What you could do is make a self-targeting bloodlust(i think its called frenzy) and then say that when its used, give the casting unit a permanent immolation. This permanent immolation should be edited so it can only target self. That way the user takes 10 damage a second. Then, if there is a set time for how long the frenzy lasts, you can just run an action that waits till frenzy ends and then you can remove permanent immolation. |
| 07-15-2004, 03:33 PM | #11 |
Be careful though, the AI tends to auto-use frenzy... |
