Hero Button Positioning

For fulfilled maps that most likely don't work on the latest patch (1.24 or later).

Moderator: Cheaters

User avatar
gudson
Junior Member
Posts: 34
Joined: July 31st, 2007, 4:06 am
Title: Smile

Hero Button Positioning

Post by gudson »

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))
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.
Image
User avatar
Kryptonyte
Forum Staff
Posts: 1400
Joined: March 17th, 2008, 12:07 am

Re: Hero Button Positioning

Post by Kryptonyte »

Hm... I don't know why it'd move the icon to the bottom, I'm not sure how to fix it either... = /
Image
Made by the late ILikeHacking

My quote from SKillER
Spoiler:
Chat wrote:(19:12:41) SKillER: newfags cant triforce
(19:20:30) SKillER: ▲
▲ ▲
(19:20:35) SKillER: aww
(19:20:37) FatherSpace: FAIL
(19:20:43) Kryptonyte: Wow stop failing.
(19:20:47) SKillER: ▲
▲ ▲
(19:21:41) Kryptonyte: .

. ▲
▲ ▲
(19:22:20) Kryptonyte: I guess you were right, newfags can't triforce.
(19:22:29) SKillER: . . ▲
▲ ▲
(19:23:04) SKillER: OMFG
(19:23:06) SKillER: ... THIS CHAT
(19:23:06) SKillER: !
(19:23:36) SKillER: ▲
▲ ▲
(19:23:46) SKillER: ▲
.▲ ▲
Apparently, SKillER is a newfag.
Rich Kane
Member
Posts: 77
Joined: May 27th, 2008, 9:08 pm

Re: Hero Button Positioning

Post by Rich Kane »

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.
User avatar
gudson
Junior Member
Posts: 34
Joined: July 31st, 2007, 4:06 am
Title: Smile

Re: Hero Button Positioning

Post by gudson »

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.
Image
Rich Kane
Member
Posts: 77
Joined: May 27th, 2008, 9:08 pm

Re: Hero Button Positioning

Post by Rich Kane »

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.
Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Re: Hero Button Positioning

Post by Arabidnun »

May I see the map to fix the triggers?
Rich Kane
Member
Posts: 77
Joined: May 27th, 2008, 9:08 pm

Re: Hero Button Positioning

Post by Rich Kane »

i think the easiest way would be metamorphasis and add a skill based on engernearing upgrade to change all the skills around.
Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Re: Hero Button Positioning

Post by Arabidnun »

EDIT:Sorry I had to edit so many times, was thinking of stuff while I was making another trigger.

Problem Solved:

[blinking]
Trigger FIXED
[/blinking]
Spoiler:
Variables: Item Hero Spell Value Variable

Morph
Events
Unit - A unit Acquires an item
Conditions
And - All (Conditions) are true
Conditions
((Hero manipulating item) is an illusion) Equal to False
(Item-type of (Item being manipulated)) Equal to Claws of Attack +15
(Unit-type of (Hero manipulating item)) Equal to Phalax
Actions
Set Temp_Ability_Level[1] = (Level of Holy Light for (Hero manipulating item))
Set Temp_Ability_Level[2] = (Level of Divine Shield for (Hero manipulating item))
Set Temp_Ability_Level[3] = (Level of Resurrection for (Hero manipulating item))
Set Temp_Ability_Level[4] = (Level of Devotion Aura for (Hero manipulating item))
Set Temp_Exp = (Hero experience of (Hero manipulating item))
Set Temp_Point = (Position of (Hero manipulating item))
Set Temp_Skill = (Unspent skill points of (Hero manipulating item))
Set Temp_Item[1] = (Item carried by (Hero manipulating item) in slot 1)
Set Temp_Item[2] = (Item carried by (Hero manipulating item) in slot 2)
Set Temp_Item[3] = (Item carried by (Hero manipulating item) in slot 3)
Set Temp_Item[4] = (Item carried by (Hero manipulating item) in slot 4)
Set Temp_Item[5] = (Item carried by (Hero manipulating item) in slot 5)
Set Temp_Item[6] = (Item carried by (Hero manipulating item) in slot 6)
Unit - Remove (Hero manipulating item) from the game
Unit - Create 1 Illidan (Evil) for Player 1 (Red) at Temp_Point facing Default building facing degrees
Hero - Set (Last created unit) experience to Temp_Exp, Hide level-up graphics
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Temp_Ability_Level[1] Not equal to 0
Then - Actions
Hero - Learn skill for (Last created unit): Holy Light
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Temp_Ability_Level[2] Not equal to 0
Then - Actions
Hero - Learn skill for (Last created unit): Divine Shield
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Temp_Ability_Level[3] Not equal to 0
Then - Actions
Hero - Learn skill for (Last created unit): Devotion Aura
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Temp_Ability_Level[4] Not equal to 0
Then - Actions
Hero - Learn skill for (Last created unit): Resurrection
Else - Actions
Unit - Set level of Holy Light for (Last created unit) to Temp_Ability_Level[1]
Unit - Set level of Divine Shield for (Last created unit) to Temp_Ability_Level[2]
Unit - Set level of Resurrection for (Last created unit) to Temp_Ability_Level[3]
Unit - Set level of Devotion Aura for (Last created unit) to Temp_Ability_Level[4]
Hero - Give Temp_Item[1] to (Last created unit)
Hero - Give Temp_Item[2] to (Last created unit)
Hero - Give Temp_Item[3] to (Last created unit)
Hero - Give Temp_Item[4] to (Last created unit)
Hero - Give Temp_Item[5] to (Last created unit)
Hero - Give Temp_Item[6] to (Last created unit)
Item - Remove (Item carried by (Last created unit) of type Claws of Attack +15
Hero - Modify unspent skill points of (Last created unit): Set to Temp_Skill points
Selection - Select (Last created unit) for (Triggering player)
Custom script: call RemoveLocation (udg_Temp_Point)

Along with a sneaky little map..
Morph Map.w3x
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.
You do not have the required permissions to view the files attached to this post.
User avatar
gudson
Junior Member
Posts: 34
Joined: July 31st, 2007, 4:06 am
Title: Smile

Re: Hero Button Positioning

Post by gudson »

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.
Image