With the new "Cross Cliff Location" validator introduced in patch 1.2, I attempted to use it so that units could not attack through walls, even if they have vision.
Here was my logic, two behaviors, since I couldn't think of a way to do it with 1.
Then apply both behaviors to your unit of choice. The idea is that the second behavior prevents firing, and the first behavior disables the second. If the target is across a cliff, then the validator for behavior 1 returns false, so it becomes disabled, thus enabling behavior 2 which suppresses attack.
My problem is that if I place the unit with the behaviors on the map, the game crashes during loading.
If I build the unit while playing the map, the game crashes as soon as the unit would be created.
Question.... why are you trying to prevent the units from attacking over a cliff in the first place?
Does it cause an issue with your map or what?.... You could just disable thier vision to see above the cliff.
Me thinks your behaviors are bad.... hence the crashing.... "attack" related behaviors can only respond to damage events from my understanding... so they react to the unit attacking not before.... so what ever you are trying to do its bugging the game out with these behaviors....
You can use triggers for this..... they made a new condition for it I belive
In the condition Ill use an or with two possible ways to go about it but you prolly can use just one depending on how you want it to work
Event
Unit acquires target
Condition
OR
Height Of Point(position of triggering unit) != Height Of Point(targeted unit) - (this is intended to determine they are on the same cliff level)
Cliff Exists Between Points(position of triggering unit, position of targeted unit) = true - (this is a new boolean condition i believe was added with the lasted patch)
Actions
Cancle Unit actions... (not sure the best way to do this.. because the unit will just attempt to re-aquire the target again
It's not the height difference, it is the fact that there is, conceptually, a solid wall between the attacking unit and the target unit.
attacker -> o
======================== <- cliff wall
target -> o
The two units are on the same "height" but there is a cliff wall between them. If they see each other, they should still not be able to fire at one another because it would be shooting through a wall.
In my map it can not be controlled purely through vision, due to shared vision between allies.
I have seen this done... but people have to convert the units to using missiles instead of standard weapons
In your other post one guy said that "weapons can not have validators" Im not sure if thats true myself. Im fairly novice at data.
This is how I would make a marine shoot like your talking in data
remove the weapon....
create a channeled ability that periodically does a missile effect
Create Missile unit
Create behavior on missile unit that periodically uses a (persistent effect)
Create the persistent effect with a "facing offset" so that the persistent effect targets a location 1 unit of distance a head of the direction it is traveling
The persistent effect has a validator of "cliff level difference" > .1 (not sure what the difference you should look for is, for an example you can look at the "reaper" cliff jump as an example)
In the target effect of the persistent it would then use another effect to kill the source unit (being the missile itself)... this target effect should only be applied if the persistent effect's target validator finds a cliff level difference.
create your kill missile effect that the persistent effect uses as a target effect.
like i said Im a data novice. But I read up on the way people do stuff around here and I experiment in my free time...
I know Mephs uses a system like this for the way his hero "ace" does his guass rifle attacks, but he has triggers in there for it because he doesnt like units to "auto attack" .... where as like this ... its a channeled ability that can be targeted and channeled...
Man, all you need is that new validator called "Pathable" that checks to see if the current location of the check is ground pathable. Put this sucker on your missile's scanning kill-switch behavior under 'remove' or whatever, and your missile will impact on doodads, cliffs, and anything that cant be walked through or Ground units collide with. Works great with my deadfire-missile ability.
Thank you, that is very helpful and will be useful for manual firing by players. However it does not address static defenses like Auto Turrets attempting to fire through walls. I don't want them blinding firing into walls, I would prefer that they not fire at all if they can't hit the target.
Thank you, that is very helpful and will be useful for manual firing by
players. However it does not address static defenses like Auto Turrets
attempting to fire through walls. I don't want them blinding firing into
walls, I would prefer that they not fire at all if they can't hit the
target.
You remove thier weapon and create an auto-cast abiltiy that acts like a weapon that does the exact same thing with the missiles above.... they way you are trying to force the weapons to work is not the way they are meant to.... unless you can actually use validators with weapons...
Rollback Post to RevisionRollBack
Skype
KageNinpo = SN
My Libraries
DialogLeaderboard & TeamSort
My Projects
SPACEWAR Tribute
Infinite TD
I am not sure what you mean about the attack related behaviors. These behaviors are not based around Damage Response of buff behaviors.
My theory was that if the unit acquires a target, the validator checks if there is a cliff, and if there is a cliff it suppresses the attack ability.
Come to think of it the problem may be that it is attempting to run the validator even though the unit does not have a target, thus the crash... I will have to check later.
Your trigger is very similar to what I attempted to do in data, where effectively:
Unit acquires target
Cliff between target and attacker
Prevent attack
If it can be done in triggers though and the data version continues to crash, then I may move to a trigger solution.
Event: any unit acquires a target
Condition: line between attacker and target crosses a cliff == true
Action: this is the part i need help on
Any idea how to make it clear its target or ignore the target? If I tell I use "Issue order - stop" it just stops then immediately keeps firing at the target, since stopping does not clear the target.
I also tried adding the behaviors via trigger to turrets that had already been placed, rather than setting them as initial behaviors on the Unit object itself.
This caused them to be active on the unit without crashing the game.
Unfortunately it seems that the validator is fucked up or something because it disables the "check" behavior at very odd times.
Ok, I realized that my original logic was flawed because "target unit" of the validator, in the context of the buff, does not mean the target of the unit with the buff, but the target of the buff, thus not working properly.
Ok, I realized that my original logic was flawed because "target unit"
of the validator, in the context of the buff, does not mean the target
of the unit with the buff, but the target of the buff, thus not working
properly.
Behaviors that use an effect "use the (source Unit) to refer to unit with the behavior)
so does it work now?
Rollback Post to RevisionRollBack
Skype
KageNinpo = SN
My Libraries
DialogLeaderboard & TeamSort
My Projects
SPACEWAR Tribute
Infinite TD
No, because I don't believe that "target" ever makes sense for the validator, since it never considers the target of the unit to be the referred target.
I think I will need to do what you suggested and make an autocast ability with the validator on that.
For one I dont believe your using the behavior acurately... from my understanding the behaviors needs to do something... and the something it does needs to run to validator.......
there are switch effects that you could run with the behaviors that can act like an if then statement but in data... but i dont know when you would want it to run ... periodically really doesnt refer to the target hes trying to aim his weapon at ... and on attack occurs after the unit actually does damage to another unit....
im a bit of a novice so .... I may be missing something crucial ... but nobody else seems very interested .... sorry
Rollback Post to RevisionRollBack
Skype
KageNinpo = SN
My Libraries
DialogLeaderboard & TeamSort
My Projects
SPACEWAR Tribute
Infinite TD
With the new "Cross Cliff Location" validator introduced in patch 1.2, I attempted to use it so that units could not attack through walls, even if they have vision.
Here was my logic, two behaviors, since I couldn't think of a way to do it with 1.
Behavior 1: NoShootingThroughWalls Check
Behavior 2: NoShootingThroughWalls DisableWeapons
Then apply both behaviors to your unit of choice. The idea is that the second behavior prevents firing, and the first behavior disables the second. If the target is across a cliff, then the validator for behavior 1 returns false, so it becomes disabled, thus enabling behavior 2 which suppresses attack.
My problem is that if I place the unit with the behaviors on the map, the game crashes during loading. If I build the unit while playing the map, the game crashes as soon as the unit would be created.
Question.... why are you trying to prevent the units from attacking over a cliff in the first place?
Does it cause an issue with your map or what?.... You could just disable thier vision to see above the cliff.
Me thinks your behaviors are bad.... hence the crashing.... "attack" related behaviors can only respond to damage events from my understanding... so they react to the unit attacking not before.... so what ever you are trying to do its bugging the game out with these behaviors....
You can use triggers for this..... they made a new condition for it I belive
In the condition Ill use an or with two possible ways to go about it but you prolly can use just one depending on how you want it to work
@SouLCarveRR: Go
It's not the height difference, it is the fact that there is, conceptually, a solid wall between the attacking unit and the target unit.
attacker -> o
======================== <- cliff wall
target -> o
The two units are on the same "height" but there is a cliff wall between them. If they see each other, they should still not be able to fire at one another because it would be shooting through a wall.
In my map it can not be controlled purely through vision, due to shared vision between allies.
I updated my post after you responded
I have seen this done... but people have to convert the units to using missiles instead of standard weapons
In your other post one guy said that "weapons can not have validators" Im not sure if thats true myself. Im fairly novice at data.
This is how I would make a marine shoot like your talking in data
like i said Im a data novice. But I read up on the way people do stuff around here and I experiment in my free time...
I know Mephs uses a system like this for the way his hero "ace" does his guass rifle attacks, but he has triggers in there for it because he doesnt like units to "auto attack" .... where as like this ... its a channeled ability that can be targeted and channeled...
@scmapcritic: Go
Man, all you need is that new validator called "Pathable" that checks to see if the current location of the check is ground pathable. Put this sucker on your missile's scanning kill-switch behavior under 'remove' or whatever, and your missile will impact on doodads, cliffs, and anything that cant be walked through or Ground units collide with. Works great with my deadfire-missile ability.
@NoMan4Hire: Go
Thank you, that is very helpful and will be useful for manual firing by players. However it does not address static defenses like Auto Turrets attempting to fire through walls. I don't want them blinding firing into walls, I would prefer that they not fire at all if they can't hit the target.
You remove thier weapon and create an auto-cast abiltiy that acts like a weapon that does the exact same thing with the missiles above.... they way you are trying to force the weapons to work is not the way they are meant to.... unless you can actually use validators with weapons...
@SouLCarveRR: Go
I am not sure what you mean about the attack related behaviors. These behaviors are not based around Damage Response of buff behaviors.
My theory was that if the unit acquires a target, the validator checks if there is a cliff, and if there is a cliff it suppresses the attack ability.
Come to think of it the problem may be that it is attempting to run the validator even though the unit does not have a target, thus the crash... I will have to check later.
Your trigger is very similar to what I attempted to do in data, where effectively:
If it can be done in triggers though and the data version continues to crash, then I may move to a trigger solution.
@SouLCarveRR: Go
Yeah I was kind of annoyed that the basic "Attack" ability does not have a validator field.
Auto cast abilities about about the same thing as a weapon anyways... and you have more control
Ok, I want to try it using the triggers.
Event: any unit acquires a target Condition: line between attacker and target crosses a cliff == true Action: this is the part i need help on
Any idea how to make it clear its target or ignore the target? If I tell I use "Issue order - stop" it just stops then immediately keeps firing at the target, since stopping does not clear the target.
I also tried adding the behaviors via trigger to turrets that had already been placed, rather than setting them as initial behaviors on the Unit object itself.
This caused them to be active on the unit without crashing the game.
Unfortunately it seems that the validator is fucked up or something because it disables the "check" behavior at very odd times.
Ok, I realized that my original logic was flawed because "target unit" of the validator, in the context of the buff, does not mean the target of the unit with the buff, but the target of the buff, thus not working properly.
Behaviors that use an effect "use the (source Unit) to refer to unit with the behavior)
so does it work now?
@SouLCarveRR: Go
No, because I don't believe that "target" ever makes sense for the validator, since it never considers the target of the unit to be the referred target.
I think I will need to do what you suggested and make an autocast ability with the validator on that.
@scmapcritic: Go
For one I dont believe your using the behavior acurately... from my understanding the behaviors needs to do something... and the something it does needs to run to validator.......
there are switch effects that you could run with the behaviors that can act like an if then statement but in data... but i dont know when you would want it to run ... periodically really doesnt refer to the target hes trying to aim his weapon at ... and on attack occurs after the unit actually does damage to another unit....
im a bit of a novice so .... I may be missing something crucial ... but nobody else seems very interested .... sorry
@SouLCarveRR: Go
You're missing the fact that I said I'm not using the behavior correctly and that that approach will not work ;)
I do appreciate your efforts though, at least you are attempting to help and the dialogue is better than nothing.
Asking again,
Does anyone know of a way to make a unit un-target or ignore another unit?
I want to use a trigger that says
I can confirm that the crash occurs independently of where you place the validator.