Create a new Requirement (e.g. "Research Is enabled")
Double click on the Requirement Property (or Requirement - Node Link)
Add to the node "Show" a new requirement Node of Type "Count Upgrade"
Select in the Alias List your created Upgrade ("Enable Research")
Set State to "Completed"
Now go to your Research Ability
Double Click on the "Ability - Info" Property (or "Ability - info - Button - Requirements")
Double-click in the opened Window on the Research Command wich should be enabled with the Kill
Select in the List under "Info - Button - Requirement" your created Requirement ("Research Is enabled")
Done, now the Research Command is only available, if the "Enable Research" Upgrade is researched...
Now the Trigger part: This should look like this:
EnableUpgradeAbilityEventsUnit-AnyUnitdiesLocalVariablesConditions(Ownerof(Triggeringunit))==10(Unittypeof(Triggeringunit))==OmegaliskActionsUI-Display"Your Units are now Upgradable!"for(Allplayers)toDirectiveareaTechTree-SetEnableResearchupgradelevelto1forplayer1General-Wait5.0GameTimesecondsUI-ClearDirectiveMessagesfor(Allplayers)
This should do the job jo want...
BTW:
You can insert then the Player wich killed the Unit (Killing Player or Owner of (Killing Unit) ), so that only the Player, wich killed the Omegalisk can research...
One possibility is to create a trigger that fires every time a unit is spawned and enables the Ability for this unit. (Nothing I would do ;) )
The other is to create a Upgrade or Behavior wich enables the Ability (via a Validator).
This would effect that the Ability is always visible but only useable if you have researched the Upgrade/enabled the Behaviour (like e.g. the Cloak ability of the Banshee).
You wont need the Hide Trigger and research can then be done by the "Unit dies" Trigger.
Maybe there are other Ways. But I don't know them... :)
Triggering Unit is the ultralist, wich is dying. Picked Unit is the unit you want here... ;-)
But with your code, only the Units wich are on the Map at the Moment of the Kill can be upgraded (because only for those the Ability is set visible). Is this what you want?
I need it to identify multiple units on the Map which aren't already placed at the Map Initialization.
Shall a Unit, wich spawns after the Kill also benefit from the kill?
Example.:
Ultalisk dies (all units on Map get the Ability)
Then spawns a new Unit.
Shall it have the Abil, too?
If yes, then you have to use the Methods mentioned by wOlfLisK and me or have to Create a trigger wich adds the Ability to every Unit that spawns after the Kill.
Otherwise use a trigger that picks each Unit in Playable Map and show the Ability for it.
Alternativly, maybe a targeted ability if all else fails, it would bypass the need for a check and make the players have something more to do than just find each other. It's not perfect but it should workas a last ditch effort.
I've a Inventory System in my Maps aswell. And it's quite easy (without Triggers) because SC2 Data Editor has Abilitys etc. build in...
The problem is that the Inventory window will close every time you deselect the unit with the Inventory.
And by that its closed when you reselect the unit...
So is there a way to open the Inventory window when the Unit is selected?
0
@Mesden: Go
Huh? Can you make a Screenshot?
0
In the Data Editor under "Requirements".
It's a Object Type (Data Type) like Abilities and Upgrades...
0
@Mesden: Go
First the Data Editor part:
Now the Trigger part: This should look like this:
This should do the job jo want...
BTW:
You can insert then the Player wich killed the Unit (Killing Player or Owner of (Killing Unit) ), so that only the Player, wich killed the Omegalisk can research...
Cheers Then
0
Phuu, ok.
You want to enable a research Ability, right?
0
@Mesden: Go
That will be a bit complicating...
One possibility is to create a trigger that fires every time a unit is spawned and enables the Ability for this unit. (Nothing I would do ;) )
The other is to create a Upgrade or Behavior wich enables the Ability (via a Validator).
This would effect that the Ability is always visible but only useable if you have researched the Upgrade/enabled the Behaviour (like e.g. the Cloak ability of the Banshee).
You wont need the Hide Trigger and research can then be done by the "Unit dies" Trigger.
Maybe there are other Ways. But I don't know them... :)
Cheers Then
0
@Mesden: Go
:-)
Doas it work now?
0
To your Problem:
Triggering Unit is the ultralist, wich is dying.
Picked Unit is the unit you want here... ;-)
But with your code, only the Units wich are on the Map at the Moment of the Kill can be upgraded (because only for those the Ability is set visible). Is this what you want?
Cheers Then
0
Shall a Unit, wich spawns after the Kill also benefit from the kill?
Example.:
Ultalisk dies (all units on Map get the Ability)
Then spawns a new Unit.
Shall it have the Abil, too?
If yes, then you have to use the Methods mentioned by wOlfLisK and me or have to Create a trigger wich adds the Ability to every Unit that spawns after the Kill.
Otherwise use a trigger that picks each Unit in Playable Map and show the Ability for it.
0
@theystolemynick: Go
Do it like Huesy said but use two Variables, LowestInteger and LowestIntegerIndex. Then set them like this:
BTW: You can use the For Each Action. It doas the same like the While (in this case) but is much better to read... ;)
Cheers Then
0
Have heared by a friend that this is done by Alerts, but not sure. See in Data Editor, maybe you can disable those Alerts...
Cheers Then
0
A Selection event would do the same...
0
@zeldarules28: Go
I've a Inventory System in my Maps aswell. And it's quite easy (without Triggers) because SC2 Data Editor has Abilitys etc. build in...
The problem is that the Inventory window will close every time you deselect the unit with the Inventory.
And by that its closed when you reselect the unit...
So is there a way to open the Inventory window when the Unit is selected?
Edit:
@PurpleFantum: Go Thats what I mean.
Doas anybody know a way to open the Window by Trigger?
0
I'm interrested in the same.
Maybe using a trigger?
0
SC2 Galaxy Editor uses a modified C, wich neither is Object-Orientated nor has dynamic alocated arrays... too bad :(
0
@Nite01: Go
you will have an other problem: AFAIK can't you give an array as paramter to a function/actionlist.
Edit:
@s3rius: Go
Too late... :)