This outclasses it: http://www.thehelper.net/forums/showthread.php?t=118648
I understand that creating unit is slow, but using 1 dummy result in non-MUI because if 2 units trigger the event in the same time, only one would cast the spel correctly.Jesus christ...
Listen to Vikuna, soul_reaper. Stop blowing off what he's saying because "this iz a a simple gUi tutorial". It's good practice, and as simple as creating a dummy unit at map init and setting it to a variable, that's all of like 2 lines. Vikuna is saying that creating units is slow, because the game has to load everything that goes along with the unit. Things such as abilities, health, mana ect.. (I hope you get the point).
Sorry for the bad english.I would do what you say and try to correct mistakesAs for the actual tutorial, drop the colors and use some simple bold or underlines to format the post. You also have some bad grammar in the tutorial. Now I'm not perfect with grammar, but some of the things you have in here are silly, like;
"Thanks to : Kaboo for some helps"
"The Dummy has "Locust" Ability so whe cannot select it."
I can understand if English isn't your native language, and if it is please read through your tutorial a few times, maybe even out loud before submitting.
Not sure if I really go off-topic it's just that many spellmakers have leaks in their trigger.I may implement some tips for spellmaking, throught the only one I made is aboutYour tutorial also gets very off-topic when you start explaining leaks, simply link to a tutorial made specifically for them, rather than explaining one type of leak (locations). All in all, I don't think this is a very good tutorial. I mean aside from the spelling and getting off-track all your doing is showing some basic spells that you have made, and telling how to make them. What you should be doing is talking about good coding practices and efficient ways of doing things which are commonly done wrong in GUI. Things like a global dummy unit, or indexing.
That's just my two cents..
Well thats because you are doing it wrong.but using 1 dummy result in non-MUI because if 2 units trigger the event in the same time, only one would cast the spel correctly.
I understand that creating unit is slow, but using 1 dummy result in non-MUI because if 2 units trigger the event in the same time, only one would cast the spel correctly.
Object editor.
These fields are like at the top.
"Art-Animation-Blend Time
Art-Animation-Cast BackSwing
Art-Animation-Cast Point"
Set them to 0.
Here you go sir.
Just some things to note:
Trigger:
- Ghoul Frenzy
- Events
- Unit - A unit Is attacked
- Conditions
- (Unit-type of (Attacking unit)) Equal to Ghoul
- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Random integer number between 1 and 100) Less than or equal to 20
- Then - Actions
- Unit - Move Dummy instantly to (Position of (Attacking unit))
- Unit - Change ownership of Dummy to (Owner of (Attacking unit)) and Change color
- Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Attacking unit)
- Unit - Move Dummy instantly to (Random point in (Playable map area))
- Else - Actions
Why do you need to move the dummy to the position of the attacking unit?
Its stupid and requires more lines; why not just set the range of the spell to a high value?
You don't need to change the ownership of the dummy; again this just requires an extra line.
Why do you move the dummy to a random point at the end? The dummy nevers needs to move whatsoever really.
Trigger:
- Ghoul Frenzy Copy
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Casting unit) Equal to Dummy
- Actions
- Unit - Change ownership of Dummy to Neutral Victim and Change color
^All of that is useless.
Trigger:
- Untitled Trigger 001
- Events
- Map initialization
- Conditions
- Actions
- Unit - Create 1 Dummy for Neutral Victim at (Center of (Playable map area)) facing Default building facing degrees
- Set Dummy = (Last created unit)
For creating the dummy use neutral passive.
Now for your dummy unit.
You gave it the invulnerable ability. Not needed; when a unit has locust nothing can hurt it or anything.
You didn't remove the units shadow, you should do that for aesthetic purposes.
You didn't remove the ability for the dummy to attack. Well since the dummy belongs to passive; it makes no difference, but if the dummy was for a player, the dummy could attack enemies.
Again if the dummy belongs to a player, remove its food cost and sound set.
For your spell;
Remove the cooldown, and set the range to a high value. Also change the targets allowed like i did. (Though I'm not sure if that was necessary )
Well now you know; its very possible to use one dummy for casting spells. :thup: