"Omnislash", 1 hero limit quesitons

Kenoriga

Ultra Cool Member
Reaction score
34
"Omnislash", 1 hero limit questions

1. I have been trying to make a skill that is based off a little on Omnislash, but I want it to only slice one time. I used Channel and this trigger:

Code:
Razor Strike
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Razor Strike 
    Actions
        Set currentLoc = (Position of (Triggering unit))
        Set opponLoc = (Position of (Target unit of ability being cast))
        Unit - Make (Triggering unit) Invulnerable
        Unit - Move (Triggering unit) instantly to opponLoc
        Animation - Play (Triggering unit)'s attack animation
        Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing (1000.00 + ((Real((Level of Razor Strike  for (Triggering unit)))) x 100.00)) damage of attack type Hero and damage type Normal
        Unit - Move (Triggering unit) instantly to currentLoc
        Unit - Make (Triggering unit) Vulnerable
        Custom script:   call RemoveLocation(udg_currentLoc)
        Custom script:   call RemoveLocation(udg_opponLoc)

It doesn't move to the targeted unit =/

2. How do you make it that each player can only have 1 hero? I read the index tutorial on Hero Taverns, but I couldn't find anything related to it in "Gameplay Constants".

3. Is it possible to have Player 1 units not controllable by Player 1?

Thanks :)
 

13lade619

is now a game developer :)
Reaction score
398
1 >

there aren't any waits. it fires too fast you can't notice it. put a wait before going back to your previous loc.

PS >

MUI > Multi Unit Instanceable > 2 ore more units can cast the triggered spell at the same time. A GUI trigger must not have any waits so that it will be MUI.

GUI > Graphics User Interface > the default way of writing triggers with premade blizzard functions.

-
thehelperTripleAnimatedUB.gif
 

Kenoriga

Ultra Cool Member
Reaction score
34
1 >

there aren't any waits. it fires too fast you can't notice it. put a wait before going back to your previous loc.

Ok, but it doesn't seem to do any damage as well. x(

Thanks for the definition of MUI and GUI. :D
 

Tinki3

Special Member
Reaction score
418
> It doesn't move to the targeted unit

That's because the trigger doesn't wait to move the caster back to 'currentLoc'. Everything's done instantly, so you can't tell if the caster has moved or not (but in your trigger he does).

To fix this 'problem', add a wait action in between these two lines:
Code:
    Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing (1000.00 + ((Real((Level of Razor Strike  for (Triggering unit)))) x 100.00)) damage of attack type Hero and damage type Normal
    Unit - Move (Triggering unit) instantly to currentLoc
___

> How do you make it that each player can only have 1 hero?

Something like the following trigger would do the trick:
Code:
Example
    Events
        Player - Player 1 (Red)'s Food used becomes Greater than 0.00
        Player - Player 2 (Blue)'s Food used becomes Greater than 0.00
        Player - Player 3 (Teal)'s Food used becomes Greater than 0.00
        ...
    Conditions
    Actions
        Player - Limit training of Heroes to 0 for (Triggering player)
For this to work, you'd have to make sure that every hero's food cost is at least 1.

Or, you could use this next example (if the above is not suitable):
Code:
Example
    Events
        Unit - A unit enters (Playable map area)
    Conditions
        ((Triggering unit) is A Hero) Equal to True
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Triggering unit)) Equal to Player 1 (Red)
            Then - Actions
                Player - Limit training of Heroes to 0 for Player 1 (Red)
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Owner of (Triggering unit)) Equal to Player 2 (Blue)
                    Then - Actions
                        Player - Limit training of Heroes to 0 for Player 2 (Blue)
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Owner of (Triggering unit)) Equal to Player 3 (Teal)
                            Then - Actions
                                Player - Limit training of Heroes to 0 for Player 3 (Teal)
                            Else - Actions
                                ...

___

> Is it possible to have Player 1 units not controllable by Player 1?

I think so.

The following action tell's me that it could be done, but I've never tried to do this before:
Code:
Player - Make Player 1 (Red) treat Player 1 (Red) as an Neutral with shared vision

___

> Multi Unit Instanceable > 2 ore more units can cast the triggered spell at the same time. A GUI trigger must not have any waits so that it will be MUI

MUI basically means that multiple units can cast the same triggered spell, at the same time, without the trigger malfunctioning.

Or, in other words, the trigger would run as 'smoothly' with a fire from 1 unit, as if it would when multiple units fired the trigger.
 

Kenoriga

Ultra Cool Member
Reaction score
34
Hmm, thanks Tinki. Do you know what to do if it doesn't do any damage? Inside the game, it seemed like my hero was hitting the air beside the targeted unit.

And your answer to my "1 hero limit" question enlightened me. :D
 

Kenoriga

Ultra Cool Member
Reaction score
34
Hey, it works now, thanks alot. I guess, just one last question regarding my Omnislash thingy...

How do you destroy the variable of a unit XD, it isn't "RemoveLocation", right?
 

Tinki3

Special Member
Reaction score
418
Global Variables (the one's your using), do not need to be nulled (completely removed).

If you really want to though, set your unit variable to a "No Unit" value, which is the same as nulling:
Code:
Custom Script: Set udg_Caster = null
Either way there's no point unless you really need to.
 

Kenoriga

Ultra Cool Member
Reaction score
34
So it means that they won't cause memory leaks and such?

Thanks alot Tinki, you were a great help :) :) :) :)
 

Tinki3

Special Member
Reaction score
418
> So it means that they won't cause memory leaks and such?

Special Effects, Unit Groups, Points/Locations, Units, Regions, Forces, Lightning Effects, Floating Text, Countdown Timers, BoolExprs, and a few more things as such leak.

I suggest you take a look at this tutorial.
 

Kenoriga

Ultra Cool Member
Reaction score
34
Code:
Limitation
    Events
        Unit - A unit enters (Playable map area)
    Conditions
        ((Triggering unit) is A Hero) Equal to True
    Actions
        Player - Limit training of Heroes to 1 for (Owner of (Triggering unit))

Is this possible to limit only 1 hero for each player? Sorry for bumping days old thread. :x
 

denmax

You can change this now in User CP.
Reaction score
155
Yes. But if you have Custom Heroes then you should add it on the Techtree in Advanced - Gameplay Constants
 

Kenoriga

Ultra Cool Member
Reaction score
34
BAH! I FORGOT TO include my new hero in, no wonder I could still get so many of him... -.- Thanks ^ :D
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top