• 0

    posted a message on Abillity help

    @Dhaminater: Go

    For all targeted abilities there is an "Ability - Target Filters" field, where you can alter which units are potential targets and which aren't. Simply add a new value in there and double click the different types you want changed. Assuming the spider mines are owned by an enemy, you would check enemy and then go from there and exclude things like structures, hidden, missiles etc. until you end up with only the desired targets allowed through the filter.

    Posted in: Galaxy Scripting
  • 0

    posted a message on Ability Targeting Dead Units

    @Venificus: Go

    Well, that explains pretty much everything. Should be able to fix my ability now, thanks!

    Posted in: Galaxy Scripting
  • 0

    posted a message on Ability Targeting Dead Units

    @Anthius: Go

    actually, that might just be the case, was starting to wonder if that was maybe the source of the problem. I guess I'll have to come up with something creative...

    Posted in: Galaxy Scripting
  • 0

    posted a message on Ability Targeting Dead Units

    Hello there,

    my first attempt at making a serious ability for my map has failed... basically what the ability is supposed to do, is "consume" all nearby corpses and restore energy to the caster.

    How I've gone about doing it is creating an Effect - Instant ability, which does a Search effect with a radius of 1.5, extended by unit radius, having filters set to: "Required: Biological, Dead. Excluded: Hidden, Missile, Structue". The search effect then again applies a set effect, one which hides the target and one which restores 25 energy to the caster. The thing is, no corpses are hidden and no energy is restored to the queen. I tried removing the "dead" requirement and everything works perfectly, living units around the caster are being hidden and she is given 25 energy per unit "consumed".

    I also tried with the above search filters, meaning without the "Required: Dead" but then using an IsDead validator on the set effect, this didn't work either.

    Any help would be very much appreciated, I am at my wit's end :(

    (I realize this could quite easily be triggered, but I'm trying to learn the data editor!)

    Posted in: Galaxy Scripting
  • 0

    posted a message on Trigger Never Runs

    Oh, that's great to remember for another time. In other news, my snake map is now hot and kicking!

    Posted in: Miscellaneous Development
  • 0

    posted a message on Trigger Never Runs

    oh, I figured since the variable you are refering to in the periodic trigger was changed from 0 to something else in a map init trigger, it wouldn't matter...

    EDIT: Well, that fixed it... Thanks alot for the help everyone!

    Posted in: Miscellaneous Development
  • 0

    posted a message on Trigger Never Runs

    Okay, so now I tried changing all local variables in the trigger to global ones, that didn't fix anything either. I checked all the events/actions and the trigger itself, there are no tempaltes and everything is enabled. I'll try disabling stuff one at a time I suppose.

    EDIT: I tried disabling everything except for a text message saying "Success!" and even that didn't show. I have checked the trigger numerous times, it's not a template and it's enabled, I'm 100% sure!. I'll attach the map so you can have a look I suppose... EDIT2: Game init is the trigger that's bugged.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Trigger Never Runs

    Tried that, didn't work either... I can't seem to figure out what's wrong, it worked before I tried to implement multiplayer through a for each integer, but now it just doesn't work.

    EDIT: Does an array of size 4 allow me to use indexes 0-4 or only 0-3? EDIT2: I tried changing the array sizes of all my used arrays from 4->5, but that didn't work either.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Trigger Never Runs

    I tried displaying a message at the beginning of the trigger, it never showed. It's enabled, intially on and not a template. Can't seem to figure out what's wrong. :/

    Posted in: Miscellaneous Development
  • 0

    posted a message on Trigger Never Runs

    HALP

    I am trying to make a snake type map, but I have a weird problem. My map init trigger never runs, even if I set it to run based on time elapsed, it just doesn't fire at all. Here is the trigger:

    Game Init
        Events
            Game - Map initialization
        Local Variables
            startingPoints = No Point <Point[4]>
            i = 0 <Integer>
        Conditions
        Actions
            Variable - Set startingPoints[1] = P1 Start
            Variable - Set startingPoints[2] = P2 Start
            Variable - Set startingPoints[3] = P3 Start
            Variable - Set startingPoints[4] = P4 Start
            UI - Hide the mouse cursor for (All players).
            UI - Hide game UI for (All players)
            General - For each integer i from 1 to 4 with increment 1, do (Actions)
                Actions
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            (Status of player i) != Playing
                        Then
                            Variable - Set SkipPlayer[i] = true
                        Else
                            Variable - Modify ActivePlayerAmount: + 1
                            Unit - Create 1 Zerg Eater for player i at startingPoints[i] facing Center (No Options)
                            Variable - Set PlayerEater[i] = (Last created unit)
                            Camera - Apply Camera 001 for player i over 0.0 seconds with Existing Velocity% initial velocity, 10% deceleration, and Don't Include Target
                            Camera - Follow for player i (Unit group(PlayerEater[i])) with the camera and Clear Current Target
                            Variable - Set Segment[i][0] = PlayerEater[i]
                            Visibility - Create a visibility revealer for player i within (Playable map area)
                            ------- Dialog Setup
                            Dialog - Create a Modal dialog of size (350, 200) at (25, 25) relative to Top Left of screen
                            Variable - Set LengthDialog[i] = (Last created dialog)
                            Dialog - Create a Label for Dialog LengthDialog[i] with the dimensions (0, 0) anchored to Center with an offset of (0, 0) with the text (Text(NumberOfSegments[0])) color set to Green text writeout set to false with a writeout duration of 2.0
                            Variable - Set LengthLabel[i] = (Last created dialog item)
                            Dialog - Set title of LengthDialog[i] to "Snake Length:"
                            Dialog - Show LengthDialog[i] for (Player group(i))
    

    Is there anything wrong with it that causes it to bug and not run?

    Posted in: Miscellaneous Development
  • 0

    posted a message on Camera going crazy.

    Not sure about your camera issue, but for the first question you could make a trigger like this one:

    Events

    UI - Player Any Player clicks Left mouse button Down.

    Local Variables

    CursorX = (Mouse X position clicked in the world) <Real>

    CursorY = (Mouse Y position clicked in the world) <Real>

    CursorZ = (Mouse Z position clicked in the world) <Real>

    Conditions

    Actions

    Unit - Order all units in (Selected units for player (Triggering player)) to ( Move targeting (Point(CursorX, CursorY, CursorZ))) (Replace Existing Orders)

    That should work. For the attaching of a region, there is no direct native to do that, but you could have a periodic trigger that constantly moves the region to the position of your mouse, or better yet just move it there only when you need it :)

    EDIT: Fixed lining...

    Posted in: Miscellaneous Development
  • 0

    posted a message on Creating Weapons

    You can simply change the effect of the weapon to the effect of the ability you want it to use on attack.

    Posted in: Miscellaneous Development
  • 0

    posted a message on How Would I....?

    Actually, forget what I said. You made me curious and I tried to do that blink ability of yours in the data editor myself. This is indeed possible!

    First, you create a new Effect of the type Set, one of the type Search and one of the type Damage. Now, make your blink ability apply the set effect you created, instead of the Blink Teleport effect. Make the set effect apply your search and teleport effects, and make the search effect apply your damage effect. This will make your blink apply both a search and a blink effect to your target point, so it does damage AND teleports your unit!

    If you don't want your unit to kill itself by blinking, add a validator on the damage effect of the type "TargetIsEnemy". This all seems very complicated to me, for something I could probably relatively easily trigger, not sure if i even prefer this method, but it certainly is possible!

    EDIT: Oh, and about the charge ability, it applies the effect "Zealot - Charge (Apply Buff)", which in turn applies the Behaviour "Zealot - Charging" which is what increases the Zealot's movement speed. All these links seem to really complicate some fairly simple abilities, but at the same time offer an insane amount of control.

    Posted in: Miscellaneous Development
  • 0

    posted a message on How Would I....?

    Well, about the charge, it's not an actual charge but rather an ability that applies a "behaviour", which is like a buff, that increases the Zealot's movement speed. To do a charge with an impact effect, you could do that very easily through triggers by checking for units taking damage, if the damaging unit has the charge behaviour, pause the target for a second and deal damage to it through an effect.

    For the blink ability, you would have to trigger that as well, since the ability itself doesn't allow for any sort of effect appliance. (This is all as far as I know, I could be wrong on both points I am afraid. If I am indeed wrong, maybe someone will take the time to prove me wrong and thus solve your problem!)

    Posted in: Miscellaneous Development
  • 0

    posted a message on How can i make a if No unit from player # in region X, do Y

    You might want to look at "Unit Enters Region" and "Unit Leaves Region". For the enter, just check if the unit is already owned by the player, if not, change ownership, then add a condition for the leave that checks if the amount of units owned by the player of the leaving unit is equal to 0, if it is, change the owner to neutral. Changing owners can be done very simply by using the action "Change Owner" :)

    EDIT: To check the amount of units in a region, you can use:

    (Number of Living units in (Any units in Anywhere owned by player 1 matching Excluded: Missile, Dead, Hidden, with at most Any Amount)) == 0

    It's under Unit Group - Number Of Units In Unit Group.

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