Uncontrollable unit, but able to die

BoterhaM

New Member
Reaction score
2
Hiya folks, ive made a unit (spider mine) thanks to accname that works triggerwise. basically it attacks enemy units that come in range, however its locust and so cannot be attacked. But if i remove the locust ability, i can manually move the spidermine, which i dont want.

The spidermine needs to stay put,uncontrable at location you casted it.
it needs to be able to be attacked by enemy forces, and explode (dealing 0 damage) if killed.

Could anyone help me with this epic question?
 

Nina

New Member
Reaction score
8
I'm not sure but maybe you could remove the locust and make a trigger

event - player X selects a unit
condition - triggering unit equal to unit type spider mine
action - unselect triggering unit for triggering player
 

Romek

Super Moderator
Reaction score
964
Doesn't adding and removing locust instantly do this?

it makes it unselectable, but targetable.
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
Doesn't adding and removing locust instantly do this?

it makes it unselectable, but targetable.

well yeah, that could work. Maybe.

but to remove aloc you've got to hide the unit before you do and unhide it afterwards.
 

Romek

Super Moderator
Reaction score
964
well yeah, that could work. Maybe.

but to remove aloc you've got to hide the unit before you do and unhide it afterwards.
Exactly right.

It's still instant..
 

BoterhaM

New Member
Reaction score
2
So basically i need to give the mine the locust ability and then remove it? Someone tell me how then.
 

Romek

Super Moderator
Reaction score
964
Code:
Custom Script: call UnitAddAbility(GetTriggerUnit(), 'Aloc')
Unit - Hide Triggering unit
Custom Script: call UnitRemoveAbility(GetTriggerUnit(), 'Aloc')
Unit - Unhide Triggering unit

That will work for triggering unit.
if you need it for another unit, just say so.
 

BoterhaM

New Member
Reaction score
2
Code:
Custom Script: call UnitAddAbility(GetTriggerUnit(), 'Aloc')
Unit - Hide Triggering unit
Custom Script: call UnitRemoveAbility(GetTriggerUnit(), 'Aloc')
Unit - Unhide Triggering unit

That will work for triggering unit.
if you need it for another unit, just say so.

The mine is now able to walk manually.
 

Romek

Super Moderator
Reaction score
964
Get rid of its movement then?
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
but the mine is supposed to run to near enemys and attack them.

what do you mean manually? the player can control the mine as unit?
 

BoterhaM

New Member
Reaction score
2
but the mine is supposed to run to near enemys and attack them.

what do you mean manually? the player can control the mine as unit?

yeah, it has all the actions buttons (stop,move,hold,attack,patrol)...


Tried setting movement speed to 0, doesnt work either: the mine then wont move to the attacked unit even if arange is 100000000000000.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top