Would anyone know how to turn an ability into an upgrade,
For example: Cleaving Attack is an ability and I want to make that an upgrade or research for a unit. I know it's possible, I just don't know how to do it.
Thank You in advance.
help with: Abilities and Upgrades
Moderator: Cheaters
-
- Senior Member
- Posts: 123
- Joined: July 4th, 2009, 12:00 am
- Title: Pandaren-Assassin
help with: Abilities and Upgrades
"A unit of time is as precious as a unit of gold, but you cannot don't click me back one unit of time with one unit of gold."
Thanks for all the help Syre!
Thanks for all the help Syre!
-
- Forum Staff
- Posts: 506
- Joined: November 17th, 2008, 3:49 pm
Re: help with: Abilities and Upgrades
Tested and works. Anyways, Cleave is a Boolean array variable.
Edit : Thank god im getting a new comp tomorrow..lol i hate this crashing..Anyways back ontopic, you will need to create a new upgrade through the object editor, and base it off anything. Change the data and stuff to 0 so it doesnt add any benefits, and use that.
Code: Select all
Untitled Trigger 012
Events
Unit - A unit Finishes research
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
(Researched tech-type) Equal to Cleave
Then - Actions
Set Cleave[1] = True
Else - Actions
Code: Select all
Untitled Trigger 013
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Cleave[1] Equal to True
Then - Actions
Unit Group - Pick every unit in (Units owned by Player 1 (Red) matching ((Unit-type of (Matching unit)) Equal to Footman)) and do (Unit - Add Cleaving Attack (Neutral Hostile) to (Picked unit))
Else - Actions
-
- Senior Member
- Posts: 123
- Joined: July 4th, 2009, 12:00 am
- Title: Pandaren-Assassin
Re: help with: Abilities and Upgrades
Thank you is there some kinda rep system here??
Edit: I kinda understand what the first trigger does, but what does the second do??
Edit: I kinda understand what the first trigger does, but what does the second do??
Last edited by Panda-Assassin on July 13th, 2009, 5:51 am, edited 1 time in total.
"A unit of time is as precious as a unit of gold, but you cannot don't click me back one unit of time with one unit of gold."
Thanks for all the help Syre!
Thanks for all the help Syre!
-
- Forum Staff
- Posts: 506
- Joined: November 17th, 2008, 3:49 pm
-
- Senior Member
- Posts: 123
- Joined: July 4th, 2009, 12:00 am
- Title: Pandaren-Assassin
Re: help with: Abilities and Upgrades
I can't find cleave when it gets up to the tech-type bit.
"A unit of time is as precious as a unit of gold, but you cannot don't click me back one unit of time with one unit of gold."
Thanks for all the help Syre!
Thanks for all the help Syre!
-
- Forum Staff
- Posts: 506
- Joined: November 17th, 2008, 3:49 pm
Re: help with: Abilities and Upgrades
Lol, like i said, make a new blank upgrade. Base it off anything, i used Iron forged swords. Change the data to nothing, so you dont add any other benefits, and make sure its only one level. Then, change the icon to something you will recognize. It should show up in the tech-type thing at the end after all the other upgrades.
-
- Senior Member
- Posts: 123
- Joined: July 4th, 2009, 12:00 am
- Title: Pandaren-Assassin
Re: help with: Abilities and Upgrades
Oh ok thanks. Can't believe I didn't get that.
"A unit of time is as precious as a unit of gold, but you cannot don't click me back one unit of time with one unit of gold."
Thanks for all the help Syre!
Thanks for all the help Syre!
-
- Forum Staff
- Posts: 506
- Joined: November 17th, 2008, 3:49 pm
Re: help with: Abilities and Upgrades
Alright, im guessing your going to make the upgrade go for a number of units. Sure, selecting all and giving them the ability would be easy, but what about new units that are spawned later? They will start without the upgrade. The second trigger makes it so that if the upgrade is got, then every second, any new unit will get the ability.Panda-Assassin wrote:Edit: I kinda understand what the first trigger does, but what does the second do??
-
- Senior Member
- Posts: 123
- Joined: July 4th, 2009, 12:00 am
- Title: Pandaren-Assassin
Re: help with: Abilities and Upgrades
oh sexy, thanks
"A unit of time is as precious as a unit of gold, but you cannot don't click me back one unit of time with one unit of gold."
Thanks for all the help Syre!
Thanks for all the help Syre!
-
- Forum Staff
- Posts: 506
- Joined: November 17th, 2008, 3:49 pm
Re: help with: Abilities and Upgrades
Lol np, and im guessing that you know that for each player, you change the array number..So for Red, its Cleave[1], then for Blue its Cleave[2]. If you dont have different numbers for each color, the upgrades will not work, and instead go to the wrong person.