• 0

    posted a message on Creating units at a specific point

    Im trying to make a ability that spawns two units at two different points, Im not really that accustomed to the data editor but is this possible.

    The scenario in what I want to do: Player uses ability X on his "Spawn buiding" 2 units spawn, 1 at Point1 and 1 at Point2.

    I've been experimenting with Create Unit effect but cant seem to be able to accomplish what I want. Is this possible in the data editor or should I just stick with triggers ?

    Posted in: Data
  • 0

    posted a message on Unit Calldown(Dropship)

    Dont want to revive an old thread but I recently started on a map that needed this type of ability aswell. And needed it to spawn the units without a target. Solve it after a while so I thought I'll share it here:

    - Create a new ability (I called mine MarineSpawn) type : Effect-Instant

    - Create a new effect (I called mine SpawnMarine (Create Unit)) type: kinda obvious but yeah Create Unit type.

    - Change the effect's "Data - Locations +" field to "Caster Point". Also choose the Unit to spawn in the Data - Spawn Unit field.

    - Add the Effect to the ability in the Ability's (None) - Effect field. Also choose a button in the (None) - Commands field. You can create a new one or use an existing one. - Then just add the ability to the unit that you want to have it.

    This will instantly spawn the unit at the castersPoint. So if you want the droppod to actually drop down I believe you can use the other effects from "Calldown MULE".

    Posted in: Miscellaneous Development
  • 0

    posted a message on Leap ability with data editor

    Hi ive been working on a Leap ability aswell (called mine Heroic Leap and based it off Blink). Im at the point where its working though there is some values I have to finetune.

    All the Set Variables in the beginning of Actions is to calculate how long time it will take to reach the target, so he changes height up half of the amount of time it takes and goes down to the ground over the other half. This is the part I have to finetune the values. Works pretty good on long to medium distances. Heres the trigger:

    HeroicLeap
        Events
            Unit - Any Unit uses Stalker - Blink Copy at Generic3 - Execute stage (Ignore shared abilities)
        Local Variables
            speed = ((Triggering unit) Movement Speed (Current)) <Real>
            timeItTakes = 0.0 <Real>
            distance = 0.0 <Real>
            ydistance = 0.0 <Real>
            xdistance = 0.0 <Real>
            yTarLength = 0.0 <Real>
            xTarLength = 0.0 <Real>
            xLength = 0.0 <Real>
            yLength = 0.0 <Real>
            bool = true <Boolean>
            target = (Triggering ability target unit) <Unit>
            test = (Triggering ability target point) <Point>
            T = (New timer) <Timer>
            point = 0 <Integer>
        Conditions
        Actions
            Variable - Set yLength = (Y of caster)
            Variable - Set yLength = (Y of caster)
            Variable - Set xTarLength = (X of test)
            Variable - Set xLength = (X of caster)
            Variable - Set ydistance = (yTarLength - yLength)
            Variable - Set xdistance = (xTarLength - xLength)
            Variable - Set xdistance = (Abs(xdistance))
            Variable - Set ydistance = (Abs(ydistance))
            Variable - Set distance = (ydistance + xdistance)
            Variable - Set timeItTakes = (distance / (30.0 * (Game speed factor)))
            Variable - Set timeItTakes = (timeItTakes / 7.0)
            UI - Display (Text(timeItTakes) with Any Precision decimal places) for (All players) to Debug area
            UI - Display (Text(distance) with Any Precision decimal places) for (All players) to Subtitle area
            General - While (Conditions) are true, do (Actions)
                Conditions
                    bool == true
                Actions
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            point == 0
                        Then
                            Unit - Set (Triggering unit) Movement Speed to 15.0
                            Unit - Order (Triggering unit) to ( Move targeting ((Position of target) offset by 0.0 towards (Facing of target) degrees)) (Replace Existing Orders)
                            Unit - Change (Triggering unit) height to 2.5 over timeItTakes seconds
                            Timer - Start T as a One Shot timer that will expire in 10.0 Game Time seconds
                            General - Wait for T to have (timeItTakes + 0.0) seconds Elapsed
                            Unit - Change (Triggering unit) height to 0.0 over timeItTakes seconds
                            Timer - Start T as a One Shot timer that will expire in 10.0 Game Time seconds
                            General - Wait for T to have (timeItTakes - (timeItTakes / 10.0)) seconds Elapsed
                            Variable - Set point = 1
                        Else
                            Unit - Set (Triggering unit) Movement Speed to speed
                            Environment - Create a Large Terran explosion at (Position of (Triggering unit))
                            Environment - Create Ghost - LeapEffect (Damage) at (Position of (Triggering unit)) from (Triggering unit)
                            Variable - Set bool = false
    
    Posted in: Miscellaneous Development
  • 0

    posted a message on Change height problems

    Im having some really wierd issues with changeing a Units height with triggers. So what im trying to do is creating a trigger for a new ability i've made. The main idea with the ability is that is kinda like Zealots charge but instead of just rushing to a target the caster will jump up in the air and then land at the targets position. Ive managed to trigger so the caster "jumps"/changes his height and then goes back to the ground.

    The problem is the 2nd time I use the ability, instead of raising to the height I've specified (0.3) he goes up far beyond that to something like 2.0 and the 3rd time seems to be even furhter. Seems like instead of making the Unit go to the height it adds to the current height. Here's and img of the triggers: (heightMax is a local variable Real set to 0.3)

    height Triggers

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