• 0

    posted a message on 10% chance to slow target on hit

    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?

    Posted in: Data
  • 0

    posted a message on Need help with banking kills

    @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.

    Posted in: Triggers
  • 0

    posted a message on Need help with banking kills

    My main batch of code is this:

     Unit - Create 1 (Unit type of Hero Units[Player viewing[(Triggering player)]]) for player (Triggering player) at (Random point between Point 011 and Point 010) facing 95.0 degrees (No Options)
                    Variable - Set Heroes[(Triggering player)] = (Last created unit)
                    Bank - Open bank "banknamehere" for player (Triggering player)
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            (Bank (Last opened bank) has "Kills" in section "Player") == true
                        Then
                            Unit - Set Heroes[1] Kills to (Real((Load "Kills" of section "Player" from bank (Last opened bank) as integer value)))
                            UI - Display "Bank opened from dialog" for (All players) to Chat area
                        Else
    

    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:

            Unit Group - Pick each unit in (Selected units for player 1) and do (Actions)
                Actions
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            Heroes[1] == (Picked unit)
                        Then
                            UI - Display "Heroes[1] has been set to Jim Rayno..." for (All players) to Chat area
                        Else
                            UI - Display "Jim Raynor is not set" for (All players) to Chat area
    

    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.

    Posted in: Triggers
  • 0

    posted a message on Need help with banking kills

    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.

    Set Heroes[Triggering_Player] == (Last created unit)
    
    Posted in: Triggers
  • 0

    posted a message on Need help with banking kills

    @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.

    Posted in: Triggers
  • 0

    posted a message on Need help with banking kills

    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.

    Posted in: Triggers
  • 0

    posted a message on Need help with banking kills

    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.

    Posted in: Triggers
  • 0

    posted a message on Need help with banking kills

    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 - Open bank "nameofbankhere" for player (Triggering player)
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            (Bank (Last opened bank) has "Kills" in section "Player") == true
                        Then
                            Unit - Set Heroes[1] Kills to (Real((Load "Kills" of section "Player" from bank (Last opened bank) as integer value)))
                            UI - Display "Bank opened from dialog" for (All players) to Chat area
                        Else
    

    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?

    Posted in: Triggers
  • 0

    posted a message on Protoss warping in effect

    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.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Protoss warping in effect

    @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.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Protoss warping in effect

    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.

    Posted in: Miscellaneous Development
  • 0

    posted a message on How can I make Passive abilities level-able?

    @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.

    Posted in: Data
  • 0

    posted a message on How can I make Passive abilities level-able?

    @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?

    Posted in: Data
  • 0

    posted a message on How can I make Passive abilities level-able?

    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?

    Posted in: Data
  • 0

    posted a message on Adding a hero escort to AI attack wave?

    @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.

    Posted in: Triggers
  • To post a comment, please or register a new account.