• 0

    posted a message on remembering an index number

    @s3rius: Go

    Thanks - that worked perfectly!

    For anyone wanting to use this for future reference - you have to use convert real to integer for custom value of unit as an index in addition to what he said because apparently custom values are real numbers instead of integers

    Posted in: Miscellaneous Development
  • 0

    posted a message on remembering an index number

    @Tradnan: Go

    Well i'm trying to set it up as a respawn trigger - so when zergling 1 dies a zergling spawns at point 1, and when zergling 2 dies a zergling spawns at point 2 - etc. It doesn't need to remember the team because the zerglings will always belong to hostile.

    Posted in: Miscellaneous Development
  • 0

    posted a message on [SOLVED] Changing Mouse Cursor Icon

    I believe you can set up a trigger that changes your cursor. All you have to do is create one in the data editor

    Edit: Nevermind - i was thinking of set unit highlight cursor which only changes it when you highlight a unit.

    Posted in: Miscellaneous Development
  • 0

    posted a message on remembering an index number

    Hi, Im looking for a way to get an index number from an event with a variable further down the road in an action. For Example:

    Events:

    Unit -Unit Variable[Any Unit] Dies

    Actions:

    Spawn 01 Zergling at Point Variable[Same index number as the event variable] facing Default Degrees

    What do I put as the index so the trigger can remember the index number I used in the action? Does that make sense?

    Posted in: Miscellaneous Development
  • 0

    posted a message on How To: Critical Strike Based on Stats

    @zifoon: Go That is a simpler way; however, if you follow this method the chance of critically striking will increase with every point of finesse and the damage dealt can be scaled to every point of finesse as well.

    every point of finesse increases the bonus damage by one

    EDIT: most of your criticism is fair though so im gonna go ahead and edit this tomorrow for clarity and add a simple map. plus i may end up just using double damage instead of each point of finesse increasing the crit damage so i don't have to devote an entire damage type to it.

    Posted in: Miscellaneous Development
  • 0

    posted a message on How To: Critical Strike Based on Stats

    Hello, I wrote up a way to make critical Strike based on stats and I figured I should Share it with you guys because.... well its useful.

    Before you read This make sure you understand: Triggers, and creating attributes and hero levels (veterancy)

    basically in my map a hero get 4 attribute points per level: Finesse is the stat I use to increase crit (as well as movement speed)

    The Equation is as follows:

    (Finesse+5+(Hero Level*.1))/((Hero Level/2)+100)

    If my calculations are correct it should Guarantee at least 5% crit at all times and a steady increase of crit per level if you put at least one point into finesse per level. (Feel Free to Correct and Humiliate me if im wrong because i haven't spent an incredible time making sure)

    anyhow-

    First you have to designate an attack type to be used as critical strike (I used ranged damage for this because my hero is melee and im pretty sure you can set attacks as melee and still make them ranged- there may be a way to make new types of damage i haven't experimented with this yet.)

    Set That Damage type to be affected by your attribute (finesse) mine increases ranged damage by 1.

    Next, You create an effect that deals 0 ranged damage. I called mine Critical Strike.

    ~IMPORTANT NOTE~ Im also using a stacking buff that increases the hero's stats per level as I am using a custom stat distribution system. If you are using the regular method for stat distribution ill try and update this later so I can help you out...

    ~IMPORTANT NOTE 2~ Within Bounds is BUGGED (at least the time when this was written) min sets the maximum - max sets the minimum.

    You must also create a trigger that detects hero level (mine increases by one everytime the hero levels up)

    Implement The following Trigger and you are done:

    ~~~EVENTS:~~~

    -A Unit is attacked

    ~~~VARIABLES:~~~

    -Finesse (Integer)

    -Hero Level (Real)

    -Crit (Integer)

    -Crit Text Tag (text tag)

    ~NOTE~ My Agility and Hero Level Variables are Global because I use them in other triggers as well. You might want to do the same. Also, If your map is multiplayer be sure to set them all as arrays. If you do not choose to set them as arrays ignore all [Owner of Unit(Acquired Target)] beyond this point

    ~~~Actions:~~~

    -Set Variable Crit[Owner of Unit: Acquired Target]- Random Integer Between Min: 0 and Max: Arithmatic (Integer): (Value1: Arithmatic Integer: (Value 1: Convert Real to Integer: Hero Level [Owner of Unit(Acquired Target)]) Operator* 2.2)+100) -Set Variable Finesse[Owner of Unit: Acquired Target]- Value: Stack Count of Behavior on unit: Finesse Buff -IF THEN ELSE:

    ~IF:~

    • -WITHIN BOUNDS: <Min: Arithmetic (Real): (Value 1: Convert Integer to Real: (Value 1: Finesse Index [Owner of unit (Acquired Target)])
    • Operator:+ (Value 2: Arithmatic (Real): (Value 1: Hero Level [Owner of unit (Acquired Target)] Operator:*Value 2: 0.1))>
    • Value: Crit [Owner of Unit: Acquired Target]
    • Max: 1

    ~THEN:~

    • -Environment: Create Effect on unit: Effect: Crit Damage, Target: Triggering Unit, Caster Acquired Target
    • -Create Text Tag: Text:"Critical Strike!", Players: All Players, Font Size: 24, Point: Position of Unit [Acquired Target], Height Offset: 1.0, Visible: Visible, Use Fog of War: True
    • -Set Variable: Crit text tag[Owner of Unit (acquired target)]: Last Created Text Tag
    • -Wait 0.5 Game Seconds
    • -Destroy Text Tag: Crit Text Tag[Owner of Unit(Acquired Target)]

    ~ELSE:~

    Good Luck and happy Mapping Guys! I may edit this for clarity in the future.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Stop Auto-Attack

    @xhatix: Go

    ah thank you sir that worked perfectly

    Posted in: Miscellaneous Development
  • 0

    posted a message on Stop Auto-Attack

    noob question-

    Does anyone know how to stop your unit from attacking nearby targets automatically?

    Thanks for any advice.

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