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.
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...
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!)
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!
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.
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.
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. :/
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:
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 :)
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.
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!)
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.
0
@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.
0
@Venificus: Go
Well, that explains pretty much everything. Should be able to fix my ability now, thanks!
0
@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...
0
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!)
0
Oh, that's great to remember for another time. In other news, my snake map is now hot and kicking!
0
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!
0
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.
0
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.
0
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. :/
0
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:
Is there anything wrong with it that causes it to bug and not run?
0
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...
0
You can simply change the effect of the weapon to the effect of the ability you want it to use on attack.
0
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.
0
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!)
0
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.