HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Hero Abilities System (I copy... >_>)

08-10-2006, 05:51 PM#1
st33m
So anyway, I was trying to get a system set up similar to the one used in the map, Abyss Gates. For those of you that dont know what that map is, it's a hero survival kind of map with two teams trying to outlast eachother. The part I want to focus on is the hero skill section. Basically each hero has a dummy ability that moves the selection to another unit, which is a dummy hero skill screen (or whatever you would call it). At levels 1,2,5,10, and I think 15 the hero can gain a new skill, from a pool of 3. So for example, at lvel 1 he can gain A, B or C, then at level 2 he can gain D, E or F. To level up a skill there are is a seperate ability on the bottom of the dummy screen, which levels A to A (level 2) or whatever. Same for the rest of the abilities (each has a seperate one).

My attempts to make a system like this on my own, failed miserably.

Here are my set up triggers.

Trigger:
Disable First and Second Abilities
Collapse Events
Map initialization
Conditions
Collapse Actions
Collapse Player Group - Pick every player in (All players) and do (Actions)
Collapse Loop - Actions
Player - Set the max research level of Level First Ability to 0 for (Picked player)
Player - Set the max research level of Level Second Ability to 0 for (Picked player)

Trigger:
Pick Hero
Collapse Events
Unit - A unit enters (Playable map area)
Collapse Conditions
PlayerRedHeroBoolean Equal to False
(Owner of (Triggering unit)) Equal to Player 1 (Red)
Collapse Actions
Set PlayerRedHeroBoolean = True
Set PlayerRedHero = (Entering unit)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Unit-type of (Triggering unit)) Equal to Archmage
Collapse Then - Actions
Unit - Create 1 Archmage Skills for Player 1 (Red) at (Position of Archmage Skills 0002 <gen>) facing Default building facing degrees
Set PlayerRedUpgrades = (Last created unit)
Unit - Remove Archmage Skills 0002 <gen> from the game
Else - Actions

Here is the trigger for the abilities screen.

Trigger:
Abilities Screen
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Abilities
Collapse Actions
Selection - Clear selection for (Owner of (Triggering unit))
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
Collapse Then - Actions
Selection - Select PlayerRedUpgrades for (Owner of (Triggering unit))
Else - Actions

Here are the triggers enabling the leveling of the first and second abilities.

Trigger:
Level First Ability
Collapse Events
Unit - A unit Gains a level
Collapse Conditions
(Level of (Leveling Hero)) Equal to 3
Collapse Actions
Player - Set the max research level of Level First Ability to 2 for (Owner of (Leveling Hero))

Trigger:
Level Second Ability
Collapse Events
Unit - A unit Gains a level
Collapse Conditions
(Level of (Leveling Hero)) Equal to 4
Collapse Actions
Player - Set the max research level of Level Second Ability to 2 for (Owner of (Leveling Hero))

Here are my triggers for abilities. I am only listing the storm tree, which is Storm Bolt and Chain Lightning.

Trigger:
Storm
Collapse Events
Unit - A unit Finishes an upgrade
Collapse Conditions
(Researched tech-type) Equal to Stormbolt
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Current research level of Stormbolt for (Owner of (Researching unit))) Equal to 0
Collapse Then - Actions
Unit - Add Storm Bolt to PlayerRedHero
Collapse Else - Actions
Unit - Add Chain Lightning to PlayerRedHero
Selection - Clear selection for (Owner of (Triggering unit))
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
Collapse Then - Actions
Selection - Select PlayerRedHero for (Owner of (Triggering unit))
Else - Actions

Trigger:
First Ability
Collapse Events
Unit - A unit Finishes an upgrade
Collapse Conditions
(Researched tech-type) Equal to Level First Ability
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Level of Storm Bolt for PlayerRedHero) Greater than or equal to 1
Collapse Then - Actions
Unit - Set level of Storm Bolt for PlayerRedHero to ((Level of Storm Bolt for PlayerRedHero) + 1)
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Level of Firebolt for PlayerRedHero) Greater than or equal to 1
Collapse Then - Actions
Unit - Set level of Firebolt for PlayerRedHero to ((Level of Firebolt for PlayerRedHero) + 1)
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Level of Frost Nova for PlayerRedHero) Greater than or equal to 1
Collapse Then - Actions
Unit - Set level of Frost Nova for PlayerRedHero to ((Level of Frost Nova for PlayerRedHero) + 1)
Collapse Else - Actions
Do nothing
Selection - Clear selection for (Owner of (Triggering unit))
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
Collapse Then - Actions
Selection - Select PlayerRedHero for (Owner of (Triggering unit))
Else - Actions

Trigger:
Second Ability
Collapse Events
Unit - A unit Finishes an upgrade
Collapse Conditions
(Researched tech-type) Equal to Level Second Ability
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Level of Chain Lightning for PlayerRedHero) Greater than or equal to 1
Collapse Then - Actions
Unit - Set level of Chain Lightning for PlayerRedHero to ((Level of Chain Lightning for PlayerRedHero) + 1)
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Level of Rain of Fire for PlayerRedHero) Greater than or equal to 1
Collapse Then - Actions
Unit - Set level of Rain of Fire for PlayerRedHero to ((Level of Rain of Fire for PlayerRedHero) + 1)
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Level of Rain of Fire for PlayerRedHero) Greater than or equal to 1
Collapse Then - Actions
Unit - Set level of Rain of Fire for PlayerRedHero to ((Level of Rain of Fire for PlayerRedHero) + 1)
Collapse Else - Actions
Do nothing
Selection - Clear selection for (Owner of (Triggering unit))
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
Collapse Then - Actions
Selection - Select PlayerRedHero for (Owner of (Triggering unit))
Else - Actions

Okay, that was really long, but I think that was all the essential triggers. Basically, each level the hero gains a lumber, and the abilities dummy screen has upgrades on it. When the hero gains level 3 he can upgrade the first ability, and when he hits level 4 he can upgrade the second ability.

What I tried to do was have an upgrade that was:

Level 1: Stormbolt
Level 2: Chan Lightning

to simulate the different abilities you could pick each tier. When you got Stormbolt (Rank 1) it would add Stormbolt to the hero, and when you got it to rank 2 it would add Chain Lightning.

My problems are: A) I couldnt add the ability properly. No idea why. B) Because of that I have no idea if they will level up properly.

Smaller problems: For some reason putting my up level ability at (1,1) and my hero abilities ability at (2,1) isnt working. Shouldnt that put them next to eachother? Instead its hiding the heros one somewhere.