• 0

    posted a message on Long tentacle falls through ground

    I'm making an ability that fires a long tentacle that attaches to its' target, and then retracts pulling the target along with it. I used neural parasite as my base, and have the tentacle firing extreme distances and pulling. Neural parasite already had some seeming bugs I had to work around, but that's another story...

    The tentacle seems to curve underneath the ground past a certain point. To avoid this, I tried adding height to the invisible missle that flies towards the target, but that didn't seem to work. I tried using actors to direct the missle to hit the target's head, but that didn't seem to work either. I'm a little stumped.

    Any suggestions?

    Posted in: Data
  • 0

    posted a message on Converting 'Triggering Ability Command' to String

    I don't believe there is a way to do this. I think you can compare abilities, so if you need to catch an event where a specific ability is used that's fine, but if you're looking to print the name of an arbitrary ability as text, you're out of luck.

    Posted in: Triggers
  • 0

    posted a message on Dropship unload falling animation?

    @BorgDragon: Go

    Ahhh, I checked the marine for reference and saw there were no such events so assumed it wasn't on him. However, he does have an event macro for unload :) That must be it.

    Thanks for encouraging me to double check (the right thing.)

    Posted in: Data
  • 0

    posted a message on Dropship unload falling animation?

    I'm at a loss on what sort of actor I need to create that causes units unloaded by a flying dropship to animate and fall to the ground. As it is they come out of the dropship with hands in the air and wait there until given an order, at which point they instantly fall to the ground and enter the normal stand animation.

    I've gone through all the actors and copied everything I could find about unload and medivac that seemed relevant: I have the dropship animating, sounds playing, dust playing where the units should land, but I can't get the guys to fall properly.

    Help appreciated :)

    Posted in: Data
  • 0

    posted a message on Beyond Shooting while Moving

    You could even add multiple weapons to the unit and a linked cooldown. Prioritize the 'standing' weapon over the moving weapon. This way you can have different rates of fire, to simulate that you can't go full auto while running around. Just a possibility though, the above suggestions are good, i'd probably use the switch myself.

    The effect switch is the simplest, and I'd go with that myself. If you're curious about even more methods, you could have two weapons on the unit: one that can be used while moving, and a more powerful one that cannot. Simply make the standing version the first weapon and give them a linked cooldown and the unit will choose automatically.

    Also I think you could add a behavior to the unit that debuffs damage, and use a validator to choose whether that behavior is active? If the unit was able to use multiple weapons, this would allow you to give a relative damage penalty to any weapon while moving.

    Posted in: Data
  • 0

    posted a message on Spell Help

    @ShadowDestroyer: Go

    You set the model on that actor for the buff, yeah? You're sure your behavior is on? :) I do the exact same thing he mentioned, works great for me.

    The force amount doesn't seem to do jack. THe work around is to create a persistent which applies the force repeatedly for an amount of time, so that units will continue to move out of the area. I think the tutorial I linked does it that way, and I as well have had to do that. Also be sure to lift units before pushing them, but again, in the tutorial...

    Posted in: Data
  • 0

    posted a message on Spell Help

    @ShadowDestroyer: Go

    1.) push/pull effects: http://forums.sc2mapster.com/resources/tutorials/9021-data-force-effects-intermediate-difficulty/ . You can do a search area and make cone searches for 'units in front of the caster.' You'll probably need to make a persistent with a search effect with the same cone that applies the force for what you're looking for.

    2.) I'm not sure how easily this could be done in data: honestly I can only think of a good way to do it via triggers, and even then it'd be limited... there's a default behavior for invulnerability, it sets the incoming damage fraction to 0. The trick is counting the damage that would have been done.

    3.) Explain more about your buff actor? If you had an continuous animation, like terran burning building effect, you can go into the event list for that actor and add Behavior.YourBehavior.On : Create, and Behavior.YourBehavior.Off : Destroy.

    Posted in: Data
  • 0

    posted a message on guided missile

    @Reaper872: Go

    It'd need to he heavily triggered. I'd make a dummy ability that didn't do anything, and catch the event of it being used. When it's used, use a trigger to create the unit, and save it to a global variable. Then create another trigger that catches the mouse move event, and if that unit exists (ie the global is not No Unit) issue an order to that unit to move to the location of the mouse. If the distance between the unit and the mouse is less than some very small amount, kill the unit, set the global to No Unit, create your explosion effect....

    You may need a periodic check for the distance, since if the player isn't moving the mouse as it approaches the target you wouldn't get the mosue moved event and hence may not check the distance....

    Posted in: Miscellaneous Development
  • 0

    posted a message on Trigger + Button

    @PBobbert: Go

    You can catch the event:

    Unit uses ability at stage
    

    It sounds like you're trying to code around a bug rather than fix the bug though...

    Posted in: Data
  • 0

    posted a message on Make unit follow mouse + more

    The above solution doesn't scale to multiple players, not does it answer your facing question, so I'll comment on those.

    I do some similar things in my game. I store information about my 5 players in an array. Player 0 is bugged, and seems to always have vision of the entire map, so my players are #1-5 in the map settings.I have an array of size 6 (ie has slots 0-5).

    Make a data type 'record' to store information about your players. You'll want to have the fields:

    Unit - hero_ // The players character/hero/unit/whatever
    Boolean - right_mouse_down_ = False // track the mouse state
    

    Make an array of appropriate size for your number of players (and i assume your player numbers are continous from 1.) The array should be of the record type you've made. Let's call the array 'players'

    Now make a trigger similar to what the previous poster suggested:

    RightClickOn
        Events
            UI - Player Any Player clicks Right mouse button Down.
        Local Variables
        Conditions
        Actions
            General - Set variable players[Triggering Player()].right_click_on_ = True
    

    Make a similar trigger RightClickOff that handles the mouse up state, and sets the variable to false. Now make a trigger to handle the right actions on mouse movement (and forgive my pseudo code, I don't have the editor available)

    MouseMoved
    MouseMoved
        Events
            UI - Player Any Player moves mouse.
        Local Variables
            point target = PointFromXY(Mouse X position in the world, Mouse Y position in the world)
        Conditions
        Actions
            If then else
                if (conditions) =>
                    players[Triggering Player()].right_click_on_ == True
                then =>
                    // Move the unit
                    Unit - Issue Order Targetting Point - Order unit players[Triggering Player()].hero_ to Move targetting point target
                else =>
                    // Just adjust the facing
                    // I am making this command up! I am sure there's one like it though
                    Unit - Order unit to face point - Order unit players[Triggering Player()].hero_ to face point target
    

    If there isn't an action for making a unit face a point, but rather only one facing an angle, you'd just need to compute the angle between the position of players[i].hero_ and target.

    Posted in: Triggers
  • 0

    posted a message on SC2Layout

    Re the original post, yes, people are using this post 1.2 and your tutorial is appreciated :) At first I started trying to remove frames that I didn't want, and was baffled by the crashes. Your tutorial and demo files helped get me unstuck, and I'm sure others too.

    As for useful wiki information, I think something that probably confuses most people is simply which element corresponds to what. A graphical breakdown of which elements in the UI files correspond to which element of which dialog would probably help people identify the elements they're looking to move/remove. Would be a bit of a hassle to fully document that, but in addition to what you already have, it seems the next most useful thing you could document.

    Posted in: Wiki Discussion
  • 0

    posted a message on Spell's damage based on unit damage

    Behaviors can give bonuses to damage classes, ie ranged, melee, spell, etc. Couldn't you just have all the sources that modify the heroes melee/ranged damage also modify the spell damage? This seems like it would be the simplest method.

    Posted in: Triggers
  • 0

    posted a message on Rescuable Units and Zerg Artilliary

    @HoliestCow: Go

    Another solution for transferring the unit is you could add an auto-cast ability to the unit you want transferred. Have it target units not owned by the same player in the target filters. I'm not sure if you can via data transfer the unit owner: if you could i'd expect it to be a 'modify unit' effect. There's a transfer unit field there, but i'm skeptical it's what you're looking for.

    Assuming there's no good way to do the transfer via data, you could catch the ability used event for that ability type. In the processing of that use the trigger to transfer ownership and disable the auto-cast ability for the triggering unit. The advantage of doing it this way is those neutral units can move, or you could move them in your map without having to re-do the regions associated with them as per the first solution.

    For the drop pods I'd take the last guy's advice and check the campaign map. If that doesn't work for you, you could do all that through data. Make an ability that does a create unit effect (the drop-pod.) Enter a Z offset in the create unit effect so it starts in the sky. In the create unit effect also set the spawn effects to a set effects that contains two effects: apply behavior (spawn countdown) and a modify unit effect. Use the modify unit effect to lower the pod to the ground over X seconds. The behavior would have a duration of X, and the expire/finish effects would be suicide and spawn units, so that the drop pod dies and it creates the units you want.

    Posted in: Triggers
  • 0

    posted a message on Tip for preventing double dialog item clicks with bnet lag

    Just sharing a quick tip:

    There's a function 'dialog item is enabled for player' - it's slightly broken, but useful. Although dialog items default to enabled, if you call this on a dialog item without explicitly setting the dialog item to enabled/disabled, you'll get a trigger error. So just explicitly set your dialog items to enabled after creating them. Then, in triggers handling dialog item clicks on dialog items that may have been disabled you can use 'used dialog item is enabled for triggering player' as a condition to the trigger. This will prevent you from getting an event for a disabled dialog item being pressed while playing over bnet (where the race condition exists.)

    Is there a good wiki/collection of editor bugs to add something like this to?

    Posted in: Triggers
  • 0

    posted a message on Instant removal of all units Armor / Energy

    @eLeCtroDiels: Go

    If you want to restore their values when the time is up, instead of just using a trigger to set their values to 0, you could apply a behavior to them that when expires gives them energy/armor. I don't remember what you can do with armor mods and behaviors, hopefully you can set it to max/min of 0? or maybe 3 armor - 5 = 0? (as in you can't go below 0 armor.) If that's the case, instead of setting the armor in trigger, your behavior can just debuff their armor and have the 15 second duration you want. You can also have the behavior set the units' maximum energy to 0, and then when it expires it'll return to whatever. The unit will probably end at 0 energy though, so you'll also want an expire effect on the behavior that has an effect - modify unit - vitals (energy, whatever).

    So yeah, just do these modifications in a beahvior with a duration of 15 seconds or whatever, and then use the method above for getting all units and apply the behavior to them instead of modify their values directly.

    Does this answer your question?

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