Hello, I'm quite new with triggers, though I've worked on data modding, and now I wanted to jump to the next level. Well I now a few things of programming, I have programmed on C and C + +, I know how arrays variables and functions work and all the stuff. Now I have a project in mind and I thought I could start using triggers for it.
Ok so i looked for tutorials and it appeared quite easy, but when I tryed to do what I wanted, it turned out complicated. The thing is that I want to know the sequences of a unit since an enemy unit gets in range untill it shoots. The aim of this is to add a condition to the process, so when the enemy unit is in range checks the angle of vision and if it's over a determined angle (let's say 90º (PI/2 rad)) then it breaks the execution of the action. I don´t know where is the trigger that does the attack action and neither if it is changeable or not.
Im pretty sure you cant modify that process with triggers, and as far as i can tell you can only set some predifined target filters for a weapon in the data editor.
You could however disable auto-attack for the unit you want to modify, then create triggers that makes that unit attack but with your own conditions.
Hmm, sorry i think i missunderstood you the first time. If you mean that you want units to have a "line of sight" so they only attack units in front of them then thats easy :P
If you open the data editor and find the "behaviors" and create a new behavior of type "buff". Then you go in to "Behavior - Modification+", go to "unit", scroll down a bit and find "Radar Arc". This is the arc of detection for the unit, should be set to 360 degrees per default. Change that to something like 90, and you can also change the radar range in the value over that one.
Next, apply the behavior to the unit, either by going to the "Units" tab, find the unit, and add the behavior in "Behavior - Behaviors+" OR by adding the behavior to a unit through a trigger.
I hope that was what you wanted and that it helps. Its possible through handling everything in triggers like i said first, but that would probly start lagging the game if you have more than a couple of units at once.
Sorry but I'm unnable to do this. I tryed to make the buffer and change radar and detection arc but it still doesn't work (i even tryed with 1º) The thing is that if i have a marine facing to north and a zergling gets nearby from south this marine won't detect, so it will not attack; but if the zergling comes from north it will detect him and attack.
I'm so noob at this D:
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hello, I'm quite new with triggers, though I've worked on data modding, and now I wanted to jump to the next level. Well I now a few things of programming, I have programmed on C and C + +, I know how arrays variables and functions work and all the stuff. Now I have a project in mind and I thought I could start using triggers for it.
Ok so i looked for tutorials and it appeared quite easy, but when I tryed to do what I wanted, it turned out complicated. The thing is that I want to know the sequences of a unit since an enemy unit gets in range untill it shoots. The aim of this is to add a condition to the process, so when the enemy unit is in range checks the angle of vision and if it's over a determined angle (let's say 90º (PI/2 rad)) then it breaks the execution of the action. I don´t know where is the trigger that does the attack action and neither if it is changeable or not.
Thank very much.
Im pretty sure you cant modify that process with triggers, and as far as i can tell you can only set some predifined target filters for a weapon in the data editor.
You could however disable auto-attack for the unit you want to modify, then create triggers that makes that unit attack but with your own conditions.
I see ok that was usefull thanks ;)
Wait, one more problem, where can I disable auto-attack?? I'm freaking out looking for it in units, efects and abilities...
Hmm, sorry i think i missunderstood you the first time. If you mean that you want units to have a "line of sight" so they only attack units in front of them then thats easy :P
If you open the data editor and find the "behaviors" and create a new behavior of type "buff". Then you go in to "Behavior - Modification+", go to "unit", scroll down a bit and find "Radar Arc". This is the arc of detection for the unit, should be set to 360 degrees per default. Change that to something like 90, and you can also change the radar range in the value over that one.
Next, apply the behavior to the unit, either by going to the "Units" tab, find the unit, and add the behavior in "Behavior - Behaviors+" OR by adding the behavior to a unit through a trigger.
I hope that was what you wanted and that it helps. Its possible through handling everything in triggers like i said first, but that would probly start lagging the game if you have more than a couple of units at once.
Yes that was exactly what I wanted to do, lot of thanks. I'm dissapointed I couldn't use triggers for this D:
Sorry but I'm unnable to do this. I tryed to make the buffer and change radar and detection arc but it still doesn't work (i even tryed with 1º) The thing is that if i have a marine facing to north and a zergling gets nearby from south this marine won't detect, so it will not attack; but if the zergling comes from north it will detect him and attack.
I'm so noob at this D: