Pharaoh_
The epic journey will soon begin... Prepare!
- Reaction score
- 136
1) MUI issue; i am making a spell which i tried to make it MUI. To be honest, i didn't get myself busy with indexing, so, i need to know if i am that pathetic on my first -almost- MUI triggering. It certainly has a problem, cause the triggered damage doesn't work by the second time i cast the spell, but the rest stuff does; let me explain to you:
Questions:
1) I have seen some maps setting even the path of the special effect in a variable when it comes to MUI. Should i set it? It sounds too much.
2) The animation, the pause and the invulnerable state are all applied. What happens with the damage though? They all work for the first time, the second time only the 3 upper cases occur, but the damage and the special effects are all gone.
3) How to remove the leaks, when it comes to non specific numbered indexes (e.g. MUI -> Custom script: call RemoveLocation (udg_Point [?])?
Other stuff:
4) I want to define some units by type: Ghost/ Troll/ Tauren and such. I want to use a buff on the unit to depict this, but i am afraid that if a unit uses a dispell-type item, the buff will be displaced. Any idea on how to show the type of the unit to an enemy (without floating texts) and retain the buff status or even a better solution?
5) A camera is set, which follows the rotation of the unit. When it comes to a hill, i want the camera to get an angle equal to the facing of the unit not only by X, but by Z too. I mean, the angle of the camera to point exactly what the head unit is facing. Everything works fine on flat terrain, but the camera still keeps to show the terrain when a unit is climbing up a hill.
6) Another camera issue: When i order a unit (which has the camera locked on it) to move to a point, the unit doesn't initially directly face the point i ordered, but it's like another point with offset is created and order the unit to face that point, but as it comes closer to the point of issued order, it then faces it normally. How can i get over this annoying issue? It's like the ground has some pathing blockers. :I
7) How to edit the damage done against Light and Heavy Armor Armor in Gameplay Constants? It only has Small/Medium/Large Armor, which i would like to edit their names in Game Interface, when the only editable ones are Light and Heavy Armor.
8) How to detect the gold a player recieved by killing a unit (bounty) and give 10% of it to another player? I mean, i have an integer running once every 0.2 seconds and another every 0.5; then i get their difference, but, if a player kills with an AoE spell or a cleaving attack multiple units, the difference becomes too high and seems inaccurate in first place. How to detect such thing? Can i avoid setting the gold in variables for each unit (e.g. Set Gold[1] = 24
Events
A unit dies
Conditions
Unit-type of (Dying unit) Equal to X
Actions
Game - Display to (All Players) (String(Gold[1]))----> Not this, this would take ages. Apart from that, there are some units in the map that drop random gold amount, so, how can i know?
9) How to make a doodad model in-game to be sinked in the ground? No, not a pre-placed doodad (by using Alt+Page Down), i mean a unit with the model of a doodad. When i make the unit Amphibious in the Object Editor and place it in the map, it is normally half-shown on the ground (the other half is underground). When i spawn it in-game, it appears all over the ground normally. Any idea on how to solve such thing? Is it because it has no animations = No solution?
10) Is this considered as a MUI timer? (Meaning that the effects will not stop for the first cast, when a second cast is done) Set Timer[MUI] (The value MUI = (MUI + 1))= (Last created timer), Countdown Timer - Start Timer [MUI] as a one shot (...). Is this "Timer[MUI]" variable enough to apply the same effects of a spell and avoid timers pausing each other, due to the inefficience of GUI triggering?
11) I am making GUI MUI spells. The increasing MUI-based value integer that increases by 1 every time a unit casts a spell, can it be placed on any spell i make or it will have to be an additional integer, so it becomes:
Set MUI1 = (MUI1 + 1)
Set MUI2[MUI1] = (MUI2[MUI1] + 1)
and so that i use on every MUI spell the second value (MUI2[MUI1])?
Sorry for such flood, but instead of opening 7 threads, i have this!
Every time a question is answered, the question will be hidden with "Hide" tag.
+Rep to all helpful answers
Trigger:
- Plague
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Plague
- Actions
- Set MUI = (MUI + 1)
- Set Unit[MUI] = (Triggering unit)
- Set Point[MUI] = (Position of Unit[MUI])
- Unit - Pause Unit[MUI]
- Unit - Make Unit[MUI] Invulnerable
- Set Damage = 20.00
- Animation - Play Unit[MUI]'s stand animation
- Trigger - Turn on Plague 2 <gen>
- Events
Trigger:
- Plague 2
- Events
- Time - Every 0.20 seconds of game time
- Conditions
- Actions
- Set Timer[MUI] = (Timer[MUI] + 1)
- Set Group[MUI] = (Units within 500.00 of Point[MUI] matching ((((Matching unit) is A structure) Equal to False) and (((Matching unit) belongs to an enemy of (Owner of Unit[MUI])) Equal to True)))
- Unit Group - Pick every unit in Group[MUI] and do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ((Picked unit) is in Group2[MUI]) Equal to False
- Then - Actions
- Unit Group - Add (Picked unit) to Group2[MUI]
- Unit Group - Pick every unit in Group2[MUI] and do (Actions)
- Loop - Actions
- Set Sp[MUI] = (Sp[MUI] + 1)
- Special Effect - Create a special effect attached to the head of (Picked unit) using Units\Undead\PlagueCloud\PlagueCloudtarget.mdl
- Unit - Cause Unit[MUI] to damage (Picked unit), dealing Damage damage of attack type Chaos and damage type Normal
- Set SpecialEffect[Sp[MUI]] = (Last created special effect)
- Loop - Actions
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Timer[MUI] Equal to 50
- Then - Actions
- Trigger - Turn off (This trigger)
- Unit Group - Remove all units from Group2[MUI]
- Animation - Reset Unit[MUI]'s animation
- Unit - Unpause Unit[MUI]
- Unit - Make Unit[MUI] Vulnerable
- For each (Integer A) from 1 to Sp[MUI], do (Actions)
- Loop - Actions
- Special Effect - Destroy SpecialEffect[(Integer A)]
- Loop - Actions
- Else - Actions
- If - Conditions
- Events
Questions:
1) I have seen some maps setting even the path of the special effect in a variable when it comes to MUI. Should i set it? It sounds too much.
2) The animation, the pause and the invulnerable state are all applied. What happens with the damage though? They all work for the first time, the second time only the 3 upper cases occur, but the damage and the special effects are all gone.
3) How to remove the leaks, when it comes to non specific numbered indexes (e.g. MUI -> Custom script: call RemoveLocation (udg_Point [?])?
Other stuff:
4) I want to define some units by type: Ghost/ Troll/ Tauren and such. I want to use a buff on the unit to depict this, but i am afraid that if a unit uses a dispell-type item, the buff will be displaced. Any idea on how to show the type of the unit to an enemy (without floating texts) and retain the buff status or even a better solution?
5) A camera is set, which follows the rotation of the unit. When it comes to a hill, i want the camera to get an angle equal to the facing of the unit not only by X, but by Z too. I mean, the angle of the camera to point exactly what the head unit is facing. Everything works fine on flat terrain, but the camera still keeps to show the terrain when a unit is climbing up a hill.
6) Another camera issue: When i order a unit (which has the camera locked on it) to move to a point, the unit doesn't initially directly face the point i ordered, but it's like another point with offset is created and order the unit to face that point, but as it comes closer to the point of issued order, it then faces it normally. How can i get over this annoying issue? It's like the ground has some pathing blockers. :I
7) How to edit the damage done against Light and Heavy Armor Armor in Gameplay Constants? It only has Small/Medium/Large Armor, which i would like to edit their names in Game Interface, when the only editable ones are Light and Heavy Armor.
8) How to detect the gold a player recieved by killing a unit (bounty) and give 10% of it to another player? I mean, i have an integer running once every 0.2 seconds and another every 0.5; then i get their difference, but, if a player kills with an AoE spell or a cleaving attack multiple units, the difference becomes too high and seems inaccurate in first place. How to detect such thing? Can i avoid setting the gold in variables for each unit (e.g. Set Gold[1] = 24
Events
A unit dies
Conditions
Unit-type of (Dying unit) Equal to X
Actions
Game - Display to (All Players) (String(Gold[1]))----> Not this, this would take ages. Apart from that, there are some units in the map that drop random gold amount, so, how can i know?
9) How to make a doodad model in-game to be sinked in the ground? No, not a pre-placed doodad (by using Alt+Page Down), i mean a unit with the model of a doodad. When i make the unit Amphibious in the Object Editor and place it in the map, it is normally half-shown on the ground (the other half is underground). When i spawn it in-game, it appears all over the ground normally. Any idea on how to solve such thing? Is it because it has no animations = No solution?
10) Is this considered as a MUI timer? (Meaning that the effects will not stop for the first cast, when a second cast is done) Set Timer[MUI] (The value MUI = (MUI + 1))= (Last created timer), Countdown Timer - Start Timer [MUI] as a one shot (...). Is this "Timer[MUI]" variable enough to apply the same effects of a spell and avoid timers pausing each other, due to the inefficience of GUI triggering?
11) I am making GUI MUI spells. The increasing MUI-based value integer that increases by 1 every time a unit casts a spell, can it be placed on any spell i make or it will have to be an additional integer, so it becomes:
Set MUI1 = (MUI1 + 1)
Set MUI2[MUI1] = (MUI2[MUI1] + 1)
and so that i use on every MUI spell the second value (MUI2[MUI1])?
Sorry for such flood, but instead of opening 7 threads, i have this!
Every time a question is answered, the question will be hidden with "Hide" tag.
+Rep to all helpful answers