Hi, i searched the forum, but didn't find any ability or questions related to what i'm seeking ...
In my map, i would like to make a force field around my unit (that will follow him), and that all surrounding units (even neutral and allies) couldn't get in ...
Is this supposed to be an ability or just on the unit at all times? If its the latter then just modify the unit's radius to be larger than the unit. Make an actor that uses the model of the force field and attach it to the unit.
I would like to be an ability that i could turn ON and OFF ...
DrSuperEvil, i'll go check it now, and i'll tell you if it helps me :)
In that case you'll want to have it so when you turn on the ability it adds a behavior that does a periodic search effect. The search effect finds all units nearby and uses an apply force effect to apply a positive (I think positive is away? I don't remember I'm old and rusty) force to the unit to push them away. Make an actor that is created and destroyed when this behavior is turned on/off with the model of a force field.
Ok ! I checked it and i'll try a couple of things, but i don't want to 'push' units, i want to create like a dome around my unit (with guardian shield Actor), that units can't go in, and that has push priority if my unit wearing the dome walks towards them ... Can i do that just with an Apply Force Effect ???
Nope, if you make the search fast enough (every 0.5 or .25 or even .125 seconds) you won't even be able to notice it. The only way to make them literally not be able to move near the unit is just increase its radius, but unfortunately this is permanent and cannot be changed with effects or behaviors so you will not be able to turn it off (to my knowledge).
Edit: I suppose there are some corner cases where this solution might not be favorable, for example if you think the unit will be moved instantly into groups of units or if units will be created near the unit then there will be a small amount of time that they will spend in the force field. I suggest trying it out and seeing how well it works. You can take the period all the way down to 0.0625 seconds or 1/16 of a second.
Ok ! I successfully did it with a Behavior Ability ^-^ (Behavior Ability => Buff ==> Search Area Effect ==> Apply Force)
The only problem is that units are pushed back a little bit, then they come back toward my unit, then it pushes them back again a little and that repeats continuously ... What is annoying is that after 5 minutes of this cycle, the units manage to reach unit and attack it :/
Any way i could solve this to make the Area around my Unit INPENETRABLE ?
Edit : Forget that, i solved my problem, i changed it to 0,05 period and now it works PERFECTLY :)
Hi, i searched the forum, but didn't find any ability or questions related to what i'm seeking ...
In my map, i would like to make a force field around my unit (that will follow him), and that all surrounding units (even neutral and allies) couldn't get in ...
Hooooow do i do that ?
@MacSC2: Go
Is this supposed to be an ability or just on the unit at all times? If its the latter then just modify the unit's radius to be larger than the unit. Make an actor that uses the model of the force field and attach it to the unit.
read the tutorial on the Apply Force effect.
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
@peranzormal: Go
I would like to be an ability that i could turn ON and OFF ...
DrSuperEvil, i'll go check it now, and i'll tell you if it helps me :)
In that case you'll want to have it so when you turn on the ability it adds a behavior that does a periodic search effect. The search effect finds all units nearby and uses an apply force effect to apply a positive (I think positive is away? I don't remember I'm old and rusty) force to the unit to push them away. Make an actor that is created and destroyed when this behavior is turned on/off with the model of a force field.
@DrSuperEvil: Go
Ok ! I checked it and i'll try a couple of things, but i don't want to 'push' units, i want to create like a dome around my unit (with guardian shield Actor), that units can't go in, and that has push priority if my unit wearing the dome walks towards them ... Can i do that just with an Apply Force Effect ???
@peranzormal: Go
But your solutions make a search, so units CAN temporarily enter the dome ... i would like him to be impenetrable ...
@MacSC2: Go
Nope, if you make the search fast enough (every 0.5 or .25 or even .125 seconds) you won't even be able to notice it. The only way to make them literally not be able to move near the unit is just increase its radius, but unfortunately this is permanent and cannot be changed with effects or behaviors so you will not be able to turn it off (to my knowledge).
Edit: I suppose there are some corner cases where this solution might not be favorable, for example if you think the unit will be moved instantly into groups of units or if units will be created near the unit then there will be a small amount of time that they will spend in the force field. I suggest trying it out and seeing how well it works. You can take the period all the way down to 0.0625 seconds or 1/16 of a second.
Thanks a lot Peranzormal for your help, i'll try this out tonight or tomorrow !
Is it OK if i PM you some questions if i encounter a problem ? :)
Yes.
Ok ! I successfully did it with a Behavior Ability ^-^ (Behavior Ability => Buff ==> Search Area Effect ==> Apply Force)
The only problem is that units are pushed back a little bit, then they come back toward my unit, then it pushes them back again a little and that repeats continuously ... What is annoying is that after 5 minutes of this cycle, the units manage to reach unit and attack it :/
Any way i could solve this to make the Area around my Unit INPENETRABLE ?
Edit : Forget that, i solved my problem, i changed it to 0,05 period and now it works PERFECTLY :)
Thanks a lot to everyone for your help