Staredit Network > Forums > Modding Assistance > Topic: attack only mechanical
attack only mechanical
Aug 5 2019, 8:06 pm
By: Lagi  

Aug 5 2019, 8:06 pm Lagi Post #1



I try to make unit target only Mechanical units in PY and DatEdit. I set with or without "flying" +- "ground". Still the unit attacking all targets. "mechanical" parameter just appear to not work.

what i do wrong?



None.

Aug 6 2019, 6:08 pm Voyager7456 Post #2

Responsible for my own happiness? I can't even be responsible for my own breakfast

The targeting flags don't affect how units' target selection. Units will always try to attack ground units if they have a ground weapon and air units if they have an air weapon.

Those flags determine 1) if a spell can target a unit of that type (if the order has the "use weapons.dat targeting" flag set) and 2) if the weapon will deal damage to that type of unit.



all i am is a contrary canary
but i'm crazy for you
i watched you cradling a tissue box
sneezing and sniffling, you were still a fox


Modding Resources: The Necromodicon [WIP] | Mod Night
My Projects: SCFC | ARAI | Excision [WIP] | SCFC2 [BETA] | Robots vs. Humans | Leviathan Wakes [BETA]


Aug 31 2019, 4:25 pm Lagi Post #3



i try this, dont work:

//devourer only mechanical attack

if(unit->id == UnitId::ZergDevourer && (unit->mainOrderId == OrderId::AttackMove || unit->mainOrderId == OrderId::AttackUnit)){

CUnit* orderTarget = unit->orderTarget.unit;

if(orderTarget && orderTarget->id == (units_dat::BaseProperty[orderTarget->id] & UnitProperty::Mechanical)){
unit->orderToIdle();}
}

//end devourer only mechanical attack




None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[08:01 am]
Moose -- :megaya:
[12:28 am]
KrayZee -- The fishes make me think of Animal Crossing
[11:59 pm]
Vrael -- excellent
[07:04 pm]
Sie_Sayoka -- blown out of the water
[06:50 pm]
NudeRaider -- https://staredit.net/381160/ fucking mind blown :drool:
[2025-6-29. : 1:46 am]
Vrael -- I was there Aslan, 3000 years ago when the deep magic of the One Ring was forged on the Battleship Enterprise, and Voldemort stole it
[2025-6-29. : 1:39 am]
KrayZee -- Vrael
Vrael shouted: NUDERAIDER - What the fuck did you just fucking say about me, you little bitch? I'll have you know I graduated top of my class in the Navy Seals, and I've been involved in numerous secret raids on Al-Quaeda, and I have over 300 confirmed kills. I am trained in gorilla warfare and I'm the top sniper in the entire US armed forces. You are nothing to me but just another target. I will wipe you the fuck out with precision the likes of which has never been seen before on this Earth, mark my fucking words. You think you can get away with saying that shit to me over the Internet? Think again, fucker. As we speak I am contacting my secret network of spies across the USAGermanyland and your IP is being traced right now so you better prepare for the storm, maggot.
I wonder when this was written.
[2025-6-29. : 12:46 am]
Vrael -- NudeRaider has not been on Battle.net for 311 days and 8 hours - I propose we Ban this Inactive Person for ever
[2025-6-27. : 3:48 pm]
NudeRaider -- a M.2 drive would fit here https://snipboard.io/waGiXl.jpg
[2025-6-27. : 3:46 pm]
NudeRaider -- dumbducky
dumbducky shouted: I opened my box up this morning and the M2 drive doesn't fit anything in there. Ten years worth of dust is impressive though
this drive dumbducky
dumbducky shouted: If I'm reading this right M2 keys are either 5 or 6 pins wide but mine looks like maybe 8? Wtf? http://www.supertalent.com/datasheets/6_100485.pdf
fits here: https://snipboard.io/tC7oVv.jpg because it's PCIe, not M.2
Please log in to shout.


Members Online: Moose, lil-Inferno