When you open a bank you open it for a specific player, thus you cannot check if a key exists "for a specific player". However, you can check for a key in the opened bank so you just open the bank one player at a time, using the same loop as before.
See example:
MeleeInitializationEventsGame-MapinitializationLocalVariablesGOLIATH_NATIONAL_BANK=NoBank<Bank>THE_KEY_TO_AWESOMENESS="THE_KEY_TO_AWESOMENESS"<String(Constant)>ConditionsActionsGeneral-Pickeachintegerfrom1to5,anddo(Actions)ActionsGeneral-If(Conditions)thendo(Actions)elsedo(Actions)If(Statusofplayer(Pickedinteger))==PlayingThenGeneral-If(Conditions)thendo(Actions)elsedo(Actions)If(Bank"GOLIATH_NATIONAL_BANK"existsforplayer(Pickedinteger))==falseThen------- Player does NOT have a bank and has NEVER played this map before------- - Create a new bank for the player------- - Initialize the bank contents for the new player------- - Save the bankElseBank-Openbank"GOLIATH_NATIONAL_BANK"forplayer(Pickedinteger)Variable-SetGOLIATH_NATIONAL_BANK=(Lastopenedbank)------- The bank is now opened for the SPECIFIC player.------- Everything you check for below this point in this bank is tied to this player.General-If(Conditions)thendo(Actions)elsedo(Actions)If(BankGOLIATH_NATIONAL_BANKhasTHE_KEY_TO_AWESOMENESSinsection"whatever_section_you_want")==falseThen------- No keyElse------- Key!Else
If you need a template for the Feign Death ability, look up the "Incapacitated" behavior the 4 heroes get if they receive a killing blow in the "kill all Nydus Worms" misison on Char. You have to enable the Liberty Story (Campaign) dependency to see it (File -> Dependencies -> Add Standard [Liberty Story (Campagin] -> OK [Loading dependency]).
Duplicate the Incapacitated behavior and name it something like Feign Death.
Locate "Modification - State Flags" and open the dialog containing the Object Values. Scroll to the bottom and set "Unselectable" and "Untargetable" to Enabled.
Now whenever the Feign Death behavior is active on a unit it cannot be targeted or selected (drag selection for instance) by anyone.
If you make a condition (compare) and select "Bank" under Label, you can see the whole list of checks you can perform. In case of the Key check, which you're asking for, there are:
Okay! FINE BE THAT WAY. What happed was it gave me an error saying that a trigger was returning the wrong type of variable. Triggers always return true, so I thought that a little weird. Also I got "can only pass basic types" errors randomly throughout my code.
Now we're getting somewhere. But still, it's hard to provide any help as you get the "errors randomly". If you have trouble finding out when or why the errors occur then locate the trigger which causes this to happen. In extreme cases you may have to disable other triggers one by one, and check if the errors still occur or if they changed.
And please drop the attitude. I do not know how far your skills in programming and trigger editing go, so I bring things to a certain level where we certainly can understand each other. Trust me, I've pulled out much hair from similar problems, but there's always just one to blame: yourself - the programmer. :)
If you find a flaw in the editor then you should definitely write down every and any problems you encounter, documenting everything with screenshots and the like. However, I still highly doubt this is the case.
Are you using any tools for revising previous versions of your map? If not I can recommend: http:www.dropbox.com/
Then lay down the problem, bit for bit, instead of writing some half finished sentences that barely make sense. Use sreenshots, code examples, error messages, etc.
Saying something like "the compiler is doing something wrong"... That's just dropping the ball.
You create a behavior increasing the stats you want, health (called Life and found under Vitals) for instance, and make it stack infinitely. Each stack will grant 5 health, as you pointed out.
Then create a trigger that is called when the respective unit is created (Auto Turret). Count the number of attribute points (Strength in this instance) on your hero/caster unit and apply the behavior to the newly created unit. The stack count of the behavior corresponds to the number of attribute points.
This same trigger can be used for the two Strength and two Dexterity amplifiers.
The Wisdom is quite different, though. You have to set the duration of the ability Guardian Shield using the Catalog, and this must be done prior to the cast of the ability. If your Wisdom attribute doesn't fluctuate very much, e.g. it only changes when a user puts attribute points in it or equips an item, you may do a trigger that updates the affected abilities upon changing the Wisdom levels. However, if it does fluctuate a lot (e.g. abilities increase and decrease the levels of Wisdom) you should change the levels using the Catalog prior to casting the ability - that is if you are able to predict when this is going to happen.
"Unit properties" are specific things, in regards to the SC2 Map Editor. A unit's properties are the following:
Bounty (Custom)
Bounty (Minerals)
Bounty (Terrazine)
Bounty (Vespene)
Bounty (XP)
Carried Custom Resource
Carried Minerals
Carried Terrazine
Carried Vespene
Energy
Energy (Percent)
Energy Regeneration Rate
Experience
Height
Kills
Level
Life
Life (Percent)
Life Regeneration Rate
Maximum Energy
Maximum Life
Maximum Shields
Movement Speed
Resources
Shields
Shields (Percent)
Shields Regeneration Rate
As Kueken531 says, you may change these values using the catalog. I used this video tutorial for learning how to work with the Catalog feature: http:www.youtube.com/watch?v=64x8jRL5np0
If you just need a few lines of code it's easier to copy the entire trigger/function/action definition from the map containing the code you need (source map). Hereafter you change the active map to your own map (target map) and insert the code.
But first you have to:
Find all the global variables used in the code you copy from the source map. You have to copy these to your own map first.
Check if the global variables you just copied are initialized elsewhere in the source map, e.g. a unit variables points to a specific unit. Keep this in mind so that you can initialize the variables you copied correctly.
Select the trigger containing the code you need in the source map and copy the whole thing - not just the code part you need. By doing this you will also copy the local variables, keeping the references.
Go to the target map and insert the trigger.
Delete the trigger code parts don't need, tidy up the code and voilĂ .
The red lines appear when a reference is broken. This should no longer happen as you've copied all the variables and the references to these are intact. However, if an action points to a unit in the map, for instance, you may need to copy this unit as well or insert a replacement in your map and make the action in your trigger point to this unit.
You can do a "Pick Units Matching Condition" with a condition only selecting the unit type of your Observer. This can be cumbersome, though.
I suggest you store the Observers (those units that poop out the other units you wanted) in global variables upon map initialization or when the Observers are created (use an array for this). This way you can simply use this variable (array) to refer to your pooping Observer. If you use an array (and you should!!), the index number should be the player's number. "Triggering Player" is an integer, and yes you guessed right, it's the players number. :)
0
@Lucavious: Go
No problem.
What are you working on, if you don't mind me asking?
0
@kenxftw: Go
When you open a bank you open it for a specific player, thus you cannot check if a key exists "for a specific player". However, you can check for a key in the opened bank so you just open the bank one player at a time, using the same loop as before.
See example:
0
@Selfcreation: Go
If you need a template for the Feign Death ability, look up the "Incapacitated" behavior the 4 heroes get if they receive a killing blow in the "kill all Nydus Worms" misison on Char. You have to enable the Liberty Story (Campaign) dependency to see it (File -> Dependencies -> Add Standard [Liberty Story (Campagin] -> OK [Loading dependency]).
Now whenever the Feign Death behavior is active on a unit it cannot be targeted or selected (drag selection for instance) by anyone.
0
@kenxftw: Go
If you make a condition (compare) and select "Bank" under Label, you can see the whole list of checks you can perform. In case of the Key check, which you're asking for, there are:
and:
0
@Lucavious: Go
0
Now we're getting somewhere. But still, it's hard to provide any help as you get the "errors randomly". If you have trouble finding out when or why the errors occur then locate the trigger which causes this to happen. In extreme cases you may have to disable other triggers one by one, and check if the errors still occur or if they changed.
And please drop the attitude. I do not know how far your skills in programming and trigger editing go, so I bring things to a certain level where we certainly can understand each other. Trust me, I've pulled out much hair from similar problems, but there's always just one to blame: yourself - the programmer. :)
If you find a flaw in the editor then you should definitely write down every and any problems you encounter, documenting everything with screenshots and the like. However, I still highly doubt this is the case.
Are you using any tools for revising previous versions of your map? If not I can recommend: http:www.dropbox.com/
0
@grenegg: Go
Then lay down the problem, bit for bit, instead of writing some half finished sentences that barely make sense. Use sreenshots, code examples, error messages, etc.
Saying something like "the compiler is doing something wrong"... That's just dropping the ball.
0
@kenxftw: Go
0
I seriously doubt this is the case. Human error and going blind from looking at the same code over and over is much more likely. We've all been there!
I bet you accidently selected the "Return Type" and set it to something different from what you're returning in the code.
0
@admielke: Go
You create a behavior increasing the stats you want, health (called Life and found under Vitals) for instance, and make it stack infinitely. Each stack will grant 5 health, as you pointed out.
Then create a trigger that is called when the respective unit is created (Auto Turret). Count the number of attribute points (Strength in this instance) on your hero/caster unit and apply the behavior to the newly created unit. The stack count of the behavior corresponds to the number of attribute points.
This same trigger can be used for the two Strength and two Dexterity amplifiers.
The Wisdom is quite different, though. You have to set the duration of the ability Guardian Shield using the Catalog, and this must be done prior to the cast of the ability. If your Wisdom attribute doesn't fluctuate very much, e.g. it only changes when a user puts attribute points in it or equips an item, you may do a trigger that updates the affected abilities upon changing the Wisdom levels. However, if it does fluctuate a lot (e.g. abilities increase and decrease the levels of Wisdom) you should change the levels using the Catalog prior to casting the ability - that is if you are able to predict when this is going to happen.
0
That post reminds me of Facebook status updates: "I state something random that no one will understand :DDD"
What's the issue, mate?
0
@kmkkmk: Go
"Unit properties" are specific things, in regards to the SC2 Map Editor. A unit's properties are the following:
As Kueken531 says, you may change these values using the catalog. I used this video tutorial for learning how to work with the Catalog feature: http:www.youtube.com/watch?v=64x8jRL5np0
0
@jcraigk: Go
If you just need a few lines of code it's easier to copy the entire trigger/function/action definition from the map containing the code you need (source map). Hereafter you change the active map to your own map (target map) and insert the code.
But first you have to:
The red lines appear when a reference is broken. This should no longer happen as you've copied all the variables and the references to these are intact. However, if an action points to a unit in the map, for instance, you may need to copy this unit as well or insert a replacement in your map and make the action in your trigger point to this unit.
0
@GhostlyMarine: Go
You can do a "Pick Units Matching Condition" with a condition only selecting the unit type of your Observer. This can be cumbersome, though.
I suggest you store the Observers (those units that poop out the other units you wanted) in global variables upon map initialization or when the Observers are created (use an array for this). This way you can simply use this variable (array) to refer to your pooping Observer. If you use an array (and you should!!), the index number should be the player's number. "Triggering Player" is an integer, and yes you guessed right, it's the players number. :)
Good luck!
0
@GhostlyMarine: Go
First of all, you don't need a moving region for this. You may simply do something like this:
If you want to just move the region from time to time, you may use:
And as Tekaichi says, you may also attach a region to a unit, causing it to follow it around.