GUI trigger below;
1st Problem: after this trigger executes, if i have more then one hero, it moves the hero icon to the bottom and i would like it to stay at the top.
FIXED - 2nd Problem: When the unit is replaced the all of his abilities are reset and none of the skill points are spent in the code I'm using an integer variable with 5 arrays (including 0) and setting the variable to the level of the abilities then replacing the unit then setting the levels of the abilities to the variable but the abilities still reset.
KEY: Unit Variable Animation Model Item Ability
Morph
Events
Unit - A unit Acquires an item
Conditions
And - All (Conditions) are true
Conditions
((Triggering unit) is an illusion) Equal to False
(Unit-type of (Triggering unit)) Equal to Psi Manipulator
(Item-type of (Item being manipulated)) Equal to Devil's Heart
Actions
Animation - Play (Triggering unit)'s spell channel animation
Special Effect - Create a special effect at (Position of (Triggering unit)) using DarkStar.mdx
Special Effect - Destroy (Last created special effect)
Wait 3.40 seconds
Animation - Play (Triggering unit)'s morph animation
Wait 1.00 seconds
Set Psi_Manipulator_Ability_Levels[0] = (Level of Teleport for (Triggering unit))
Set Psi_Manipulator_Ability_Levels[1] = (Level of Stealth Tactics for (Triggering unit))
Set Psi_Manipulator_Ability_Levels[2] = (Level of Pulse Wave for (Triggering unit))
Set Psi_Manipulator_Ability_Levels[3] = (Level of Psionic Image for (Triggering unit))
Set Psi_Manipulator_Ability_Levels[4] = (Level of Psionic Envelopment for (Triggering unit))
Unit - Replace (Triggering unit) with a Embrace (Psi Maniplator) using The new unit's max life and mana
Unit - Set level of Teleport for (Last replaced unit) to Psi_Manipulator_Ability_Levels[0]
Unit - Set level of Stealth Tactics for (Last replaced unit) to Psi_Manipulator_Ability_Levels[1]
Unit - Set level of Pulse Wave for (Last replaced unit) to Psi_Manipulator_Ability_Levels[2]
Unit - Set level of Psionic Image for (Last replaced unit) to Psi_Manipulator_Ability_Levels[3]
Unit - Set level of Psionic Envelopment for (Last replaced unit) to Psi_Manipulator_Ability_Levels[4]
Unit - Change color of (Last replaced unit) to Red
Animation - Play (Last replaced unit)'s birth animation
Animation - Reset (Last replaced unit)'s animation
Set Psi_Manipulator = (Last replaced unit)
Selection - Add (Last replaced unit) to selection for (Owner of (Last replaced unit))
Hero Button Positioning
Moderator: Cheaters
-
- Junior Member
- Posts: 34
- Joined: July 31st, 2007, 4:06 am
- Title: Smile
Hero Button Positioning
Last edited by gudson on July 30th, 2008, 7:11 pm, edited 6 times in total.
The deepest circle of hell is reserved for betrayers and mutineers.
-
- Forum Staff
- Posts: 1400
- Joined: March 17th, 2008, 12:07 am
Re: Hero Button Positioning
Hm... I don't know why it'd move the icon to the bottom, I'm not sure how to fix it either... = /
Made by the late ILikeHacking
My quote from SKillER
Spoiler:
-
- Member
- Posts: 77
- Joined: May 27th, 2008, 9:08 pm
Re: Hero Button Positioning
it changes your hero into a new one, if u kept the 'psy manipulator' as a unit on the map and use a trigger to hide it at the start of the game, you can change that trigger to hide your hero and unhide the psy change unit owner move it ect, then when its over hide the psy set its level to what ever ect, and unhide the origional hero. (could work)
if that does not work or you dont want to change the way your triggers work you could hide and unhide in 0.01 seconds all the rest of the heroes so that hes at the top.
if that does not work or you dont want to change the way your triggers work you could hide and unhide in 0.01 seconds all the rest of the heroes so that hes at the top.
-
- Junior Member
- Posts: 34
- Joined: July 31st, 2007, 4:06 am
- Title: Smile
Re: Hero Button Positioning
Hiding heros doesnt remove thier button at the top left of the screen, am i doing something wrong?
The deepest circle of hell is reserved for betrayers and mutineers.
-
- Member
- Posts: 77
- Joined: May 27th, 2008, 9:08 pm
Re: Hero Button Positioning
hmm and u want both hero icons at the top when they are in controle,
the item/skill that changes your hero. is there no chance of changing that into a metamorphosis skill to change your hero?
or instead of replacing the unit - add a spell equal to metamorphasis and activate it.
then you would have to rework the set level of skill/remaining skill points.
the item/skill that changes your hero. is there no chance of changing that into a metamorphosis skill to change your hero?
or instead of replacing the unit - add a spell equal to metamorphasis and activate it.
then you would have to rework the set level of skill/remaining skill points.
-
- Forum Staff
- Posts: 506
- Joined: August 5th, 2007, 1:38 pm
- Title: Gui Expert
- Location: *Unknown*
-
- Member
- Posts: 77
- Joined: May 27th, 2008, 9:08 pm
Re: Hero Button Positioning
i think the easiest way would be metamorphasis and add a skill based on engernearing upgrade to change all the skills around.
-
- Forum Staff
- Posts: 506
- Joined: August 5th, 2007, 1:38 pm
- Title: Gui Expert
- Location: *Unknown*
Re: Hero Button Positioning
EDIT:Sorry I had to edit so many times, was thinking of stuff while I was making another trigger.
Problem Solved:
[blinking]
I know this map does not have memory leaks, as I forgot to add the custom scipt, but you can add it yourself. If u need further explanation on this trigger, don't hesiatate to ask.
Problem Solved:
[blinking]
Trigger FIXED
[/blinking]
Spoiler:
You do not have the required permissions to view the files attached to this post.
-
- Junior Member
- Posts: 34
- Joined: July 31st, 2007, 4:06 am
- Title: Smile
Re: Hero Button Positioning
I fixed the skill levels, thx to Arabidnun, but the button position of the hero is still a problem, i've tried hide/unhide the other heros and changing the owner then reverting it but the buttons dont move.
The deepest circle of hell is reserved for betrayers and mutineers.