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.
[11:39 pm]
Corbo -- I wouldn't go to say it's unbelieveable but silly it definitely is
[11:39 pm]
Corbo -- but yes, the plot is silly
[11:38 pm]
Corbo -- don't hate
[11:38 pm]
Corbo -- Salazar was great
[11:25 pm]
KrayZee -- The President of the United States only sending only 1 man equipped with a pistol to rescue his daughter? Then Leon has to deal with midget Napoleon, how can you take that seriously? :P
[11:23 pm]
KrayZee -- The plot in Resident Evil 4? It's just too silly.
[11:07 pm]
Corbo -- You don't find that believeable?
[07:38 pm]
Wing Zero -- I played 6 for a bit but wasn't too happy with it. Haven't played another one since then though.
[2019-12-14. : 8:18 am]
KrayZee -- If Resident Evil 4 is getting a remake, they better make the plot believable. Like actually send an entire team to rescue the President's daughter but the team was ambushed and all equipment were lost. Leon is the only survivor and only kept a handgun. Later he would hitchhike and get picked up. He then asked to be dropped off the nearest town.
[2019-12-14. : 4:01 am]
RIVE -- The significance is lessened by the probability of future RE titles ignoring either conclusion in favor of a rewrite anyway.
Please log in to shout.


Members Online: pleny79292, Roy, eltonkemp