If multiple damage effects of the same type are placed on the same target at the same time, would it count as ONE effect or would it follow the number of times the effect is used?
If it counts as one, is there anyway to make it otherwise?
I'm not sure, but I don't think there's any such thing as "at the same time". Even using triggers, one will always occur [i]slightly[/i] before the other. That's my understanding, any way, I could be wrong.
Well my problem here is that i have a trigger that detects whenever a unit is hit by a specific effect, it will perform a certain action. However, when multiple instances of the SAME effect come from the SAME unit, it will only trigger ONCE.(This links with my other thread about weapons as i'm not sure which is the exact problem)
What's the action it's supposed to perform? I'd imagine the trigger should fire each time, but if you're not getting that... I'm just wondering if there's a way to do what you're looking to through the data editor, perhaps with a behavior that has a combat - damage response.
Ok I tested it and it turns out that it's the weapons rather than the effect that affects this trigger.(Meaning multiple weapons of the same type will only count as one)
Hmm... would it be possible to make the weapons fire sequentially, but have the time between each one be something like .001 second so you can't tell the difference?
Are the damage effects part of the same effect tree (eg persistant that hits several times or a set effect of damage effects)? It is possible to set some effects as per effect tree or per instance.
Hmm... would it be possible to make the weapons fire sequentially, but have the time between each one be something like .001 second so you can't tell the difference?
Set the weapons backswing to 0.01
Effects should always fire seperately no matter how much of them fire at the same time, they should never be counted as a single effect. That's at least the logical way it should be.
If you wont tell us what you're trigger is supposed to do, i can't help. I can most likely think of a workaround, or maybe even a data way, but i can't find an alternative if i don't know what i'm trying to find.
The Trigger will detect whenever a unit takes damage from a certain damage effect(that comes from a weapon), and will then cast ANOTHER effect from the damaging unit, on a target location that is offset a certain distance in the direction of the damaged unit from the damaging unit. Got it so far? The problem here is that if the attacking unit has multiple weapons of the same type(irregardless of turret placement), the trigger will only fire as if there was one.
Unless the offset is calculated mathematically (something like "Distance between position of (triggering unit) and (attacking unit) * (the number J - a googolplex) (ok, i gave some ridiculous numbers in the example...)), you don't need the trigger. If you just want the offset to be a fixed distance (like, 3 in front of the unit), just use a persistent effect and give it the apropriate periodic offset and give it a period of 0, 1 period, and the periodic effect of what you wanted in the first place, then stuff that persistent into a set with the damage effect from the weapon, and make the weapon use the set instead of damage.
If this is what you want, i can give more details.
You can probably also get something similar to a calculated value using a switch effect and a lot of validators that check distance, and have the switch effect pair up validators with persistents with the proper offsets. If you make 100 validators and persistents, you can get a pretty damn accurate result, but then, 100 validators and effects... If you use just 3-4 youd be stuck on 3-4 offsets, but at least no trigger that wont run.
A list of reasons that possibly screw up your trigger or alternative things you can try to fix the trigger:
You might've used "Issue order" to issue an ability order that creates your effect. The unit won't be able to cast that fast. I tried using a trigger to blink every 0.05 seconds once, didn't work.
Try using different events that basically do the same thing. You can use an Effect event to find the effect, or "unit is attacked", or "Unit takes damage", or even a "unit enters range of unit" if you're using missiles
Try using dummy effects, behaviors or units for your events/actions. Like, create a dummy unit with an invisible model to cast the ability for the effect so that the first reason can't occur. Or use any different effect type, like a persistent, and make the trigger run off of that effect instead of the damage effect (if theres an event that is basically "persistent effect expires" or "behavior is removed/expires", you can try using dummy persistents/behaviors with a short duration)
Can't think of anything else :/ Just do some more tests and change things one after another to find out what exactly isn't working. Change parameters in trigger actions, switch out effects with different effects, etc. Try and pinpoint what exactly is causing the problem.
I need it to be mathematically calculated. Like i said, it has to be in the angle from the position of the attacking unit to the position of the damaged unit. As for your trigger solutions:
1) This shouldn't be the problem as the trigger works fine with multiple different units firing the same weapon at the same time. It just doesn't work if it's multiple weapons on the same unit.
2) I AM using "Unit Takes Damage" event. The others won't work purely because there's no way to detect an attacking weapon/turret; i have multiple weapons that depend on this trigger; and using any other way will only lag the map.
If your unit has 6 turrets and each turret has the same weapon, just copy the weapon 6 times, call it 'Turret Gun 1' 'turret gun 2' etc. You now have 6 separate weapons on your unit, even if they do the same damage effects and whatnot.
You check these 6 weapons as "hidden" then you make 1 new dummy weapon that you would throw into the Equipment Array part of your unit.
If you have no idea what I am talking about, take a look at the Merc Battlecruiser. It has 4 separate weapons but only 2 show up in the game UI. All 4 are hidden but are replaced with a respective Equipment Array.
No i get you. But you're not getting the whole picture. Of course i know i can just duplicate the weapon 5 times to get the effect i want. However, for all purposes this method is not efficient. The problem here is that the unit can change its weapons at any time during the game. For example, if the unit initially has 5 Lasers and 2 missiles, it can just as easily change to 3 lasers, 5 missiles, and 1 cannon. You get the idea here?
If multiple damage effects of the same type are placed on the same target at the same time, would it count as ONE effect or would it follow the number of times the effect is used?
If it counts as one, is there anyway to make it otherwise?
I'm not sure, but I don't think there's any such thing as "at the same time". Even using triggers, one will always occur [i]slightly[/i] before the other. That's my understanding, any way, I could be wrong.
@dgh64: Go
Well my problem here is that i have a trigger that detects whenever a unit is hit by a specific effect, it will perform a certain action. However, when multiple instances of the SAME effect come from the SAME unit, it will only trigger ONCE.(This links with my other thread about weapons as i'm not sure which is the exact problem)
What's the action it's supposed to perform? I'd imagine the trigger should fire each time, but if you're not getting that... I'm just wondering if there's a way to do what you're looking to through the data editor, perhaps with a behavior that has a combat - damage response.
@sdragoon7: Go
No it's something that can only be done with the trigger editor. I can't specify the details but just take my word for it. ><
Ok I tested it and it turns out that it's the weapons rather than the effect that affects this trigger.(Meaning multiple weapons of the same type will only count as one)
Hmm... would it be possible to make the weapons fire sequentially, but have the time between each one be something like .001 second so you can't tell the difference?
@dgh64: Go
Errr how do you propose to do that lol.
No idea. Pretty much just thinking out loud here. (I'm sorta new to modding)
Are the damage effects part of the same effect tree (eg persistant that hits several times or a set effect of damage effects)? It is possible to set some effects as per effect tree or per instance.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Set the weapons backswing to 0.01
Effects should always fire seperately no matter how much of them fire at the same time, they should never be counted as a single effect. That's at least the logical way it should be.
If you wont tell us what you're trigger is supposed to do, i can't help. I can most likely think of a workaround, or maybe even a data way, but i can't find an alternative if i don't know what i'm trying to find.
What event are you using for your trigger?
Ok fine, basically what i want to do is this:
The Trigger will detect whenever a unit takes damage from a certain damage effect(that comes from a weapon), and will then cast ANOTHER effect from the damaging unit, on a target location that is offset a certain distance in the direction of the damaged unit from the damaging unit. Got it so far? The problem here is that if the attacking unit has multiple weapons of the same type(irregardless of turret placement), the trigger will only fire as if there was one.
Unless the offset is calculated mathematically (something like "Distance between position of (triggering unit) and (attacking unit) * (the number J - a googolplex) (ok, i gave some ridiculous numbers in the example...)), you don't need the trigger. If you just want the offset to be a fixed distance (like, 3 in front of the unit), just use a persistent effect and give it the apropriate periodic offset and give it a period of 0, 1 period, and the periodic effect of what you wanted in the first place, then stuff that persistent into a set with the damage effect from the weapon, and make the weapon use the set instead of damage.
If this is what you want, i can give more details.
You can probably also get something similar to a calculated value using a switch effect and a lot of validators that check distance, and have the switch effect pair up validators with persistents with the proper offsets. If you make 100 validators and persistents, you can get a pretty damn accurate result, but then, 100 validators and effects... If you use just 3-4 youd be stuck on 3-4 offsets, but at least no trigger that wont run.
A list of reasons that possibly screw up your trigger or alternative things you can try to fix the trigger:
Can't think of anything else :/ Just do some more tests and change things one after another to find out what exactly isn't working. Change parameters in trigger actions, switch out effects with different effects, etc. Try and pinpoint what exactly is causing the problem.
@TheAlmaity: Go
I need it to be mathematically calculated. Like i said, it has to be in the angle from the position of the attacking unit to the position of the damaged unit. As for your trigger solutions:
1) This shouldn't be the problem as the trigger works fine with multiple different units firing the same weapon at the same time. It just doesn't work if it's multiple weapons on the same unit.
2) I AM using "Unit Takes Damage" event. The others won't work purely because there's no way to detect an attacking weapon/turret; i have multiple weapons that depend on this trigger; and using any other way will only lag the map.
3) Won't work because of the map's game system.
@Kildare88: Go
If your unit has 6 turrets and each turret has the same weapon, just copy the weapon 6 times, call it 'Turret Gun 1' 'turret gun 2' etc. You now have 6 separate weapons on your unit, even if they do the same damage effects and whatnot.
You check these 6 weapons as "hidden" then you make 1 new dummy weapon that you would throw into the Equipment Array part of your unit.
If you have no idea what I am talking about, take a look at the Merc Battlecruiser. It has 4 separate weapons but only 2 show up in the game UI. All 4 are hidden but are replaced with a respective Equipment Array.
@BorgDragon: Go
No i get you. But you're not getting the whole picture. Of course i know i can just duplicate the weapon 5 times to get the effect i want. However, for all purposes this method is not efficient. The problem here is that the unit can change its weapons at any time during the game. For example, if the unit initially has 5 Lasers and 2 missiles, it can just as easily change to 3 lasers, 5 missiles, and 1 cannon. You get the idea here?