• 0

    posted a message on Make one enemy unit have shared sight?

    @aramada: Go

    You can create a Revealer at the position of the Nydus Worm for the desired player(s). Remember to add the Revealers to variables, otherwise you won't be able to remove the Revealer again.

    Visibility - Create a visibility revealer for player 1 within (Region((Position of (YourNydusWorm)), 1.0)) Variable - Set MyRevealer = (Last created revealer)

    Obviously the MyRevealer variable should be an array if you have multiple Nydus Worms.

    For controlling when the Revealer should be created and removed make two triggers; one for listening for when the Nydus Worm is created and one for listening for when the Nydus Worm dies.

    Posted in: Miscellaneous Development
  • 0

    posted a message on [Data] Need help with custom abilities.

    @Southpaw444: Go

    When you change an ability from "Effect - Target" to "Effect - Instant", and vice versa, the Command Card is reset. Check that your button reference is still there ("Commands +") - also on your unit.

    The link to your Effect may also have been lost in the transition. Check that it is still there ("Effect - Effect" in your ability).

    Posted in: Miscellaneous Development
  • 0

    posted a message on Consume Item Charge Bug

    @EarendilSphere: Go

    I'm not even sure there is a question in those fine sentences you wrote. Can you be more descriptive? Use examples and such. :)

    Posted in: Triggers
  • 0

    posted a message on When I remove item from inventory it also removes behaviors of duplicate items

    @HatTruck: Go

    First of, your "Triggering inventory item" is a reference to a unique item (or unit in fact) and is a response to the Event in your trigger, which you most likely know.

    You have the "Unit - Remove (Triggering inventory item) from the game" in a loop? Do you want to remove it from just one unit or from several units? In case the Firebat unit you spawn is born with this item, you have to make a new reference to this specific item (unit) and remove that.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Prevent attacking through walls (terrain)?

    'ello fellow mappers

    I've stumbled into a problem that I simply cannot figure out myself: Units can shoot directly through walls (terrain cliff level differences).

    I have illustrated the issue in this screenshot: http:dl.dropbox.com/u/249997/Screenshot2010-08-24%2001_55_45.jpg

    What I have done in the above example is:

    • Grant visibility on the entire map for both units (fog of war is not an option)
    • Increase the Marine's attack range slightly
    • Place a huge wall between them

    As you can see from the screenshot, the bullets in the Marine's C-14 Gauss Rifle pierce right through tons of solid rock and hit the opponent Marine on the other side. How do I prevent them from firing at each other when there is a wall between them?

    What have I tried is:

    • Line of Sight blockers (don't work because of the map-wide visibility)
    • Placing a region on the "wall" and removing visibility/unexplore within this region
    • Using Validators on the Marine's weapons (no luck)

    Any people with bright ideas?

    Thanks in advance

    Posted in: Miscellaneous Development
  • 0

    posted a message on Inflict damage on unit (Warcraft 3 Editor style)

    Hello my fellow mappers/modders

    Many people don't understand how you change damage amount and inflict damage through triggers in the Starcraft 2 Editor. I searched for answers and found some cumbersome approaches and not-too-well explained ways of doing this.

    So I made an Action Definition for you guys to use that works in the same way as the "Inflict damage" action event does in the Warcraft 3 Editor. You can just download the attached map and copy-paste everything to your map, but in case you want to know what is really going on behind it all, here goes:

    What you need:

    1. An Event Listener trigger, e.g. when a unit uses an ability on a target
    2. An Effect of Effect Type "Damage" for inflicting the damage
    3. An Action Definition for: (1) Changing the data in the Data Editor (through Catalog calls), (2) Inflicting damage based on the (new) Damage Amount in the Data Editor

    The Event Listener

    I made an ability based on the Ghost's Snipe ability and set the damage in this ability (read: Effect) to 0 (zero). I then made a trigger for listening at when this ability is used. When the Snipe ability is used we get two key informations for the damage inflict Action Definition to work: The "(Triggering unit)" (caster unit) and the "(Triggering ability target unit)" (target unit). Now all we need to do is feed these informations plus the amount of damage we want to inflict to our Action Definition.

    The Dummy Effect

    I based the dummy Effect for inflicting damage on the Snipe ability as well and named it "DamageUnit". You should of course change all unwanted features to something of your liking, e.g. set the armor reduction to 0. The damage amount you do not need to change as this will be done through the Action Definition.

    The Action Definition

    The Action Definition for inflicting damage takes the following three parameters:

    1. A CasterUnit (the "Triggering unit" from the Event Listener)
    2. A DamageAmount
    3. A UnitTarget (the "Triggering ability target unit" from the Event Listener)

    First in the Action Definition we must set the Damage Amount in the Catalog:

    • Catalog - Set value of Effects "DamageUnit" "Amount" for player (Owner of UnitCaster) to (String(DamageAmount) with 3 decimal places)

    Now we can inflict the damage, using the Effect "DamageUnit":

    • Environment - Execute DamageUnit on UnitTarget from UnitCaster

    You can change the Grammar Text (Syntax) in the Aciton Definition to something suitable. I change mine to:

    • Damage - Make UnitCaster inflict DamageAmount damage to UnitTarget.

    The Map Example

    I added one additional parameter to the Action Definition in my map example for changing the DamageKind, of which there are four: Melee, Ranged, Spell and Splash.

    Suggestions for additional features

    You can add features for the Action Definition such as damage versus a specific armor type, e.g. "vs Light: 5".

    Hope some people find this useful.

    DOWNLOAD EXMAPLE MAP:

    http:dl.dropbox.com/u/249997/WC3LikeDamageSystem.SC2Map

    I know there is an attachment feature on this website, couldn't find it. This is my first post, bear with me :)

    EDIT Found it! Apparently you must create the post before attaching elements. ;)

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