I want to create a unit which has a 10% chance to slow a unit by 20% for 3 seconds on attack.
I tried creating a behaviour which reduced movement speed by 20% and initialized a damage effect. However, this resulted in all kinds of strange errors, such as the damage not showing up when hovering over the icon in-game.
Thank you so much for that debugging message, it turns out the entire problem was just that Player 4's hero was overwriting Player 1's, thanks to a typo.
Also, about your first notice, I only changed it to that because of testing purposes and, of course, it should be Triggering Player.
Unit-Create1(UnittypeofHeroUnits[Playerviewing[(Triggeringplayer)]])forplayer(Triggeringplayer)at(RandompointbetweenPoint011andPoint010)facing95.0degrees(NoOptions)Variable-SetHeroes[(Triggeringplayer)]=(Lastcreatedunit)Bank-Openbank"banknamehere"forplayer(Triggeringplayer)General-If(Conditions)thendo(Actions)elsedo(Actions)If(Bank(Lastopenedbank)has"Kills"insection"Player")==trueThenUnit-SetHeroes[1]Killsto(Real((Load"Kills"ofsection"Player"frombank(Lastopenedbank)asintegervalue)))UI-Display"Bank opened from dialog"for(Allplayers)toChatareaElse
The UI Display message does work, which means the If-Then-Else statement is correct.
Also, how I know that my hero is the correct variable is through this code:
UnitGroup-Pickeachunitin(Selectedunitsforplayer1)anddo(Actions)ActionsGeneral-If(Conditions)thendo(Actions)elsedo(Actions)IfHeroes[1]==(Pickedunit)ThenUI-Display"Heroes[1] has been set to Jim Rayno..."for(Allplayers)toChatareaElseUI-Display"Jim Raynor is not set"for(Allplayers)toChatarea
In-game, every 5 seconds, if I have my hero selected, it gives me a message saying that Heroes[1] is set to my hero, which is exactly what I want.
I can't see any problem with any of the code, which is why I'm so confused as to why it won't work.
Yes, that was also mentioned specifically in the tutorial.
In my map init, the first 4 functions are exactly
"Preload and Synchronize "BankName" for player 1"
"Preload and Synchronize "BankName" for player 2"
etc.
As I mentioned in my OP, the problem is not in openng the bank, but the fault is in the variable.
After running a debug, I am completely certain that the problem is not opening nor saving the bank, so it has to be the variable.
But it's so simple, it takes whoever spawned the hero and adds that player in the specific array.
The name of the bank is not stored in a variable, but directly copied/pasted from other sources.
How do you mean when you say "player number"?
My main variable depends on the player number, and has an array of [4] for each player.
@grenegg
That is the exact tutorial I used to get thus far, however it does not go into as much detail as how to explain how I'm supposed to open the bank for a hero set from a menu after the map init.
@JakeCake26
I tried what you said, but still nothing is loaded unto my hero.
I can't use a global variable, because they don't continue their values onto the next game. A bank takes and stores values for the next time the player wants to play the game, which is exactly what I need.
I also have to store the hero's kills as an integer value, rather than store the entire unit, because I only want the kills to be restored.
Essentially, what I want is that, whenever a player kills a unit with his hero, +1 integer value is added to his file. (This works just fine).
Then, after the player has selected his hero for his next playthrough, I want the kills to carry on to that hero.
With the Heroes array (Heroes[1], [2] etc.), I can't tell exactly which hero is being used.
I could, technically, find out using a bunch of crazy checks and variables.
However, I don't want to spend that much effort on it and then realise it's not needed.
Sorry for bumping this but I really can't figure out the problem.
I forgot to mention though, that I have already "Preloaded and synchronized" the bank from map init.
If anything is unclear, please ask me about it, I realise it's probably not the easiest-read thread on the site.
I'm trying to create a bank that stores a certain unit's kills and reloads them on the next run.
The kills are saved in the file, but not opened by the hero when the game starts.
After hours of debugging, I can comfortably say that the problem is that the game does not give my hero the saved kills.
I'm using a hero selector for my map, which means that the bank has to open after the player has chosen his hero.
The code for opening the bank looks like this:
Bank-Openbank"nameofbankhere"forplayer(Triggeringplayer)General-If(Conditions)thendo(Actions)elsedo(Actions)If(Bank(Lastopenedbank)has"Kills"insection"Player")==trueThenUnit-SetHeroes[1]Killsto(Real((Load"Kills"ofsection"Player"frombank(Lastopenedbank)asintegervalue)))UI-Display"Bank opened from dialog"for(Allplayers)toChatareaElse
The Heroes variable is set to whatever unit that's spawned by a player. In my case, since I'm player 1, the hero will be "Heroes[1]".
I know this is the case, because I ran a check looking for who the variable was set to, and it returned as my hero.
When this code is run, the Text Message telling me so appears, but my hero doesn't gain any kills.
Can anyone see what my problem might be?
Yes, that is the ability that the Super Warp Gate needs in order to spawn Zeratul. However ,the problem is that he spawns from thin air. There is no effect like with other units, he just spawns like any unit made with "Create units Facing ...."
I need to know how to apply the Protoss Warp In effect (or similar) before he appears, so it looks like he was warped into the battlefield.
Ultimately, what I want is for him to spawn similar to a zealot, stalker or other protoss unit.
After a short warp effect, Zeratul appears in that spot. He didn't exist before that point, so I want him to spawn after a warp effect has played.
If that's not possible, playing a "Warp" effect and then spawning him would be great as well.
I've been stuck on the same issue for weeks now. What seemed like such a ridiculously easy task has been proven extensively difficult.
I need Zeratul to beam in to the field using a "Protoss Warp In" effect/actor. I tried spawning the actor through triggers, but to no avail, it doesn't show up.
I also noticed how there's a "Super Warp Gate" that supposedly can warp in Zeratul to the field. I tried this tactic using "Issue Orders" triggers, but nothing. The way I hope it'll work is like a Protoss assault on the zerg.
A warp prism appears and flies to its designated point. When the warp prism is near to the point, the game waits 2 seconds and then orders the warp prism to go into "Phasing mode". Zeratul is then either warped in using a Super Warp Gate, or spawned after a Protoss Warp In actor has been used.
The only problem is that none of these work. Are there any alternative methods I can use? Can anyone see the problem? Thanks in advance.
Thanks for the huge effort in helping me, this map is really informative. I was almost hoping that Blizzard had implemented something more simple, but it's good to know that it's possible.
(Also, I just realised you're the creator of one of my favourite maps. Great work on that.)
That was my first attempt on a passive ability, but it ended very quickly. I realised I had no idea how to register if a hero had learnt an ability. Is there actually any way to return if a player's learnt the dummy ability? That probably would make things more simple.
Well, the main goal for me would be the gameplay, I can worry about the details later.
Are you saying I can use trigger to enable/disable the Healing Aura behaviour for heroes? Is there any way of returning a hero's Veterancy level, then?
Hero maps are always boring unless they have some sort of passive skill in them - they're what makes the game interesting. I suppose I will have to give up if it's too complicated, but it would be a great feature.
Is there anywhere I can learn more about this? Or am I doomed to test it alone?
I've made an aura of healing, every unit in a radius of 7 from the original unit is healed 1 hp/s. I want to give this ability to my hero in order for him to level it up and improve it. Say, level 2 of the ability would have a radius of 8 and heal 2 hp/s.
This "ability" isn't an ability at all, it's a passive behaviour. My heroes can't spend their points in behaviours.
I want to make something similar to the Dark Templar's permanent cloak ability. After the ability is learnt, the button just sits there telling you what it does. The problem is that the Dark Templar ability never had any levels, so I can't use that as an example.
Does anyone have any idea how to turn a passive behaviour into a level-able ability?
I've tried multiple times to attach the ghosts to a Unit Group, but nothing I use seems to work. Do you have any suggestions how I'm supposed to put units that haven't spawned yet into a group? It seems as if I can only put units already on the map via the presets, but how would I go about attaching units using triggers?
About the "Pick each integer" thing, it's been saving me a lot of grunt work. If I want to change the player, I just change the integer and everything changes.
0
I want to create a unit which has a 10% chance to slow a unit by 20% for 3 seconds on attack.
I tried creating a behaviour which reduced movement speed by 20% and initialized a damage effect. However, this resulted in all kinds of strange errors, such as the damage not showing up when hovering over the icon in-game.
So, how would I go about creating this effect?
0
@b0ne123: Go
Thank you so much for that debugging message, it turns out the entire problem was just that Player 4's hero was overwriting Player 1's, thanks to a typo.
Also, about your first notice, I only changed it to that because of testing purposes and, of course, it should be Triggering Player.
Thanks for all your help.
0
My main batch of code is this:
The UI Display message does work, which means the If-Then-Else statement is correct.
Also, how I know that my hero is the correct variable is through this code:
In-game, every 5 seconds, if I have my hero selected, it gives me a message saying that Heroes[1] is set to my hero, which is exactly what I want.
I can't see any problem with any of the code, which is why I'm so confused as to why it won't work.
0
Yes, that was also mentioned specifically in the tutorial.
In my map init, the first 4 functions are exactly "Preload and Synchronize "BankName" for player 1" "Preload and Synchronize "BankName" for player 2" etc.
As I mentioned in my OP, the problem is not in openng the bank, but the fault is in the variable. After running a debug, I am completely certain that the problem is not opening nor saving the bank, so it has to be the variable.
But it's so simple, it takes whoever spawned the hero and adds that player in the specific array.
0
@b0ne123
The name of the bank is not stored in a variable, but directly copied/pasted from other sources. How do you mean when you say "player number"?
My main variable depends on the player number, and has an array of [4] for each player.
@grenegg That is the exact tutorial I used to get thus far, however it does not go into as much detail as how to explain how I'm supposed to open the bank for a hero set from a menu after the map init.
@JakeCake26 I tried what you said, but still nothing is loaded unto my hero.
0
I can't use a global variable, because they don't continue their values onto the next game. A bank takes and stores values for the next time the player wants to play the game, which is exactly what I need.
I also have to store the hero's kills as an integer value, rather than store the entire unit, because I only want the kills to be restored.
Essentially, what I want is that, whenever a player kills a unit with his hero, +1 integer value is added to his file. (This works just fine). Then, after the player has selected his hero for his next playthrough, I want the kills to carry on to that hero.
With the Heroes array (Heroes[1], [2] etc.), I can't tell exactly which hero is being used. I could, technically, find out using a bunch of crazy checks and variables.
However, I don't want to spend that much effort on it and then realise it's not needed.
0
Sorry for bumping this but I really can't figure out the problem. I forgot to mention though, that I have already "Preloaded and synchronized" the bank from map init.
If anything is unclear, please ask me about it, I realise it's probably not the easiest-read thread on the site.
0
I'm trying to create a bank that stores a certain unit's kills and reloads them on the next run.
The kills are saved in the file, but not opened by the hero when the game starts.
After hours of debugging, I can comfortably say that the problem is that the game does not give my hero the saved kills.
I'm using a hero selector for my map, which means that the bank has to open after the player has chosen his hero. The code for opening the bank looks like this:
The Heroes variable is set to whatever unit that's spawned by a player. In my case, since I'm player 1, the hero will be "Heroes[1]". I know this is the case, because I ran a check looking for who the variable was set to, and it returned as my hero.
When this code is run, the Text Message telling me so appears, but my hero doesn't gain any kills. Can anyone see what my problem might be?
0
Yes, that is the ability that the Super Warp Gate needs in order to spawn Zeratul. However ,the problem is that he spawns from thin air. There is no effect like with other units, he just spawns like any unit made with "Create units Facing ...."
I need to know how to apply the Protoss Warp In effect (or similar) before he appears, so it looks like he was warped into the battlefield.
0
@DrSuperEvil: Go
Ultimately, what I want is for him to spawn similar to a zealot, stalker or other protoss unit.
After a short warp effect, Zeratul appears in that spot. He didn't exist before that point, so I want him to spawn after a warp effect has played. If that's not possible, playing a "Warp" effect and then spawning him would be great as well.
0
I've been stuck on the same issue for weeks now. What seemed like such a ridiculously easy task has been proven extensively difficult.
I need Zeratul to beam in to the field using a "Protoss Warp In" effect/actor. I tried spawning the actor through triggers, but to no avail, it doesn't show up. I also noticed how there's a "Super Warp Gate" that supposedly can warp in Zeratul to the field. I tried this tactic using "Issue Orders" triggers, but nothing. The way I hope it'll work is like a Protoss assault on the zerg. A warp prism appears and flies to its designated point. When the warp prism is near to the point, the game waits 2 seconds and then orders the warp prism to go into "Phasing mode". Zeratul is then either warped in using a Super Warp Gate, or spawned after a Protoss Warp In actor has been used.
The only problem is that none of these work. Are there any alternative methods I can use? Can anyone see the problem? Thanks in advance.
0
@Kueken531: Go
Thanks for the huge effort in helping me, this map is really informative. I was almost hoping that Blizzard had implemented something more simple, but it's good to know that it's possible. (Also, I just realised you're the creator of one of my favourite maps. Great work on that.)
@SouLCarveRR: Go
That was my first attempt on a passive ability, but it ended very quickly. I realised I had no idea how to register if a hero had learnt an ability. Is there actually any way to return if a player's learnt the dummy ability? That probably would make things more simple.
0
@Kueken531: Go
Well, the main goal for me would be the gameplay, I can worry about the details later.
Are you saying I can use trigger to enable/disable the Healing Aura behaviour for heroes? Is there any way of returning a hero's Veterancy level, then?
Hero maps are always boring unless they have some sort of passive skill in them - they're what makes the game interesting. I suppose I will have to give up if it's too complicated, but it would be a great feature.
Is there anywhere I can learn more about this? Or am I doomed to test it alone?
0
I've made an aura of healing, every unit in a radius of 7 from the original unit is healed 1 hp/s. I want to give this ability to my hero in order for him to level it up and improve it. Say, level 2 of the ability would have a radius of 8 and heal 2 hp/s.
This "ability" isn't an ability at all, it's a passive behaviour. My heroes can't spend their points in behaviours.
I want to make something similar to the Dark Templar's permanent cloak ability. After the ability is learnt, the button just sits there telling you what it does. The problem is that the Dark Templar ability never had any levels, so I can't use that as an example.
Does anyone have any idea how to turn a passive behaviour into a level-able ability?
0
@pplantenga: Go
I've tried multiple times to attach the ghosts to a Unit Group, but nothing I use seems to work. Do you have any suggestions how I'm supposed to put units that haven't spawned yet into a group? It seems as if I can only put units already on the map via the presets, but how would I go about attaching units using triggers?
About the "Pick each integer" thing, it's been saving me a lot of grunt work. If I want to change the player, I just change the integer and everything changes.