# How to replace waits?

Status
Not open for further replies.

#### Ergic

Level 4
I'm learning how to make a MUI spell but i dont know how to replace waits into hastables or something so can someone teach me how te replace waits into hashtable or maybe variable or somthing that it will make my spell MUI tnx

#### Bannar

Code Reviewer
Level 26

Wyrmlord explains there how to make MUI healing over time spell useing hashtables and much more.

However, it can also be done with proper indexing. In spell section you can look for dynamic indexing done by Hanky and unit indexer done by Bride.

Basic idea is to use real value instead of waits, and create additional trigger that will be a loop. In that second trigger we do our actions, and if time has reached it's final duration we end the spell.
This is simple egzample with using real variable, its not proper MUI spell, its just made to show you the idea. For making it MUI, read tutorial I have linked above or use indexing systems I've mentioned.

• init
• Events
• Unit - Startf the effect of ability
• Conditions
• (Ability being cast) Equal to Damage over Time
• Actions
• Set Damage = 50.00
• Set Duration = 10.00
• Set unit[1] = (Triggering unit)
• Set unit[2] = (Target of the ability being cast)
• Trigger - Turn on loop DoT
Loop trigger:
• loop DoT
• Events
• Time - Every 0.05 seconds of game time
• Conditions
• Actions
• Set Duration = (Duration - 0.05)
• If (All conditions are true) then do (Then actions) else do (Else actions)
• If - Conditions
• Duration Greater than 0.00
• Then - Actions
• Unit - Cause unit[1] to damage unit[2] dealing (Damage / 200) damage of attack type Magic and damage type Normal
• Else - Actions
• Trigger - Turn off (that trigger)
If you can see, I used loop to time my DoT spell. Total damage done = 50 and total duration = 10 seconds.
I loop through 0.05 period so I'll damage target 200 times (that why Damage / 200). Also, see that trigger checks if duration has ened, if so its turned off and deals no longer damage to target.

#### haxel96

Level 9
^ LOTS of misstakes there, first, the spell is NOT MUI (i know u did write its not MUI but still), second, that will damage it 200 times total. 0.05 x 10 = 200.
You will need to use a indexing system or a hashtable. I find Indexing easier but use whatever you want.

#### Bannar

Code Reviewer
Level 26
^ LOTS of misstakes there, first, the spell is NOT MUI (i know u did write its not MUI but still), second, that will damage it 200 times total. 0.05 x 10 = 200.
You will need to use a indexing system or a hashtable. I find Indexing easier but use whatever you want.

Such an ignorant guy, and haxel96 I see you can not read, or you or blind.

This is simple egzample with using real variable, its not proper MUI spell, its just made to show you the idea. For making it MUI, read tutorial I have linked above or use indexing systems I've mentioned.

And It was miss type about 200, I entered 20 times true.
Last two sentences are useless since again, I have mentioned everything already.

Next time make proper responce, or dont post at all.

#### mckill2009

Level 29
^ LOTS of misstakes there, first, the spell is NOT MUI (i know u did write its not MUI but still), second, that will damage it 200 times total. 0.05 x 10 = 200.
You will need to use a indexing system or a hashtable. I find Indexing easier but use whatever you want.

"Damage / 200" ...

#### haxel96

Level 9
Such an ignorant guy, and haxel96 I see you can not read, or you or blind.

And It was miss type about 200, I entered 20 times true.
Last two sentences are useless since again, I have mentioned everything already.

Next time make proper responce, or dont post at all.

I mean, its not good to make a Example that is NOT MUI, when he wanted a MUI, since its so easy to actually make it MUI for you when you know how to do it.

"Damage / 200" ...

It was "Damage / 20" before i mentioned it was wrong.

#### Bannar

Code Reviewer
Level 26
I mean, its not good to make a Example that is NOT MUI, when he wanted a MUI, since its so easy to actually make it MUI for you when you know how to do it.

Once again you prove you anti reading skill.
This is an egzample for replacing waits.

#### haxel96

Level 9
Once again you prove you anti reading skill.
This is an egzample for replacing waits.

So this example is better then using a wait?

#### Bannar

Code Reviewer
Level 26
Hah man you're so funny
I see you do nothing, just sit and slap.

This for dynamic indexing, Hanky explains everything about indexing clean and nice.

This for indexing units using indexer for GUI. Bride explains farly enough aspects of indexing via indexer.

And once again haxel96, That was egzample for him to image how replacing waits look like using reals. Shut up with that spam, or writa something usefull - after all this is not adressed to you since you do not want to help anyone here.
End of story.

#### Justify

Level 13
Spinnaker, answering with examples (please, write eXample!) that don't fit the topic is just wrong. Yes, the link were ok, but then don't use a non-mui example or at least, don't wonder to get critizism if you do so.

#### Sasuke32

Level 7
or u can easy create timers now that i go to jass thing timers is all i use also jass with hashtable the best combination :X

#### Ergic

Level 4
wow tnx guys realy want to make a MUI spell

#### rysnt11

Level 17
You can dl rmx's begginer spell pack, it is very useful for learning indexing

#### defskull

Level 33
This is my way of using "waits" in hashtable (by using "death" of a dummy unit as my "timer")
You just have to be creative.

#### Attachments

• Testing Wait.w3x
14.3 KB · Views: 74
Status
Not open for further replies.

Replies
6
Views
419
Ardenian
A
Replies
2
Views
501
Replies
6
Views
689
Replies
27
Views
3K
Replies
8
Views
633