HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Targetable but controllable by player.

08-20-2009, 12:16 PM#1
Pinzu
I want to have a unit owned by lets say player 1 he can't command the unit to do anything, but you can target the unit normaly...

I found this amongs my own posts...

"Unselectable but vulnerable:
Custom Script : call UnitAddAbility( unit, 'Aloc')
Custom Script : call UnitRemoveAbility( unit, 'Aloc')

Unselectable, vulnerable and targetteable:
Custom Script : call UnitAddAbility( unit, 'Aloc')
Unit- Add (Chaos morph) to (unit)

** Chaos morph is a chaos based spell that has no tech requirements and morphs the unit to the same unit."

I used Chaos Grom, and removed all techtree and seted the spell to the footmen, cus I was told that would bug the locust, but it dosnt work... help!
08-20-2009, 12:24 PM#2
TheWye
what if you pause the unit? Does it work this way? Its targetable but not controllable. And try searching for Vex's independent summon system. Maybe that will help?
08-20-2009, 12:30 PM#3
Pinzu
ok,
08-20-2009, 01:37 PM#4
Anitarf
In my experience, you have to morph it to a different unit with chaos for that trick to work, at least, that's how I got it to work in my Glacial Wall spell.

Edit: also, I added the locust ability to the unit after chaos-morphing it, not before.
Edit2: I realize now I likely could have just paused the unit.
08-20-2009, 02:30 PM#5
Pyrogasm
Hmm... I added it before morphing; I also morphed the unit into itself.

Collapse JASS:
    call UnitAddAbility(U2, 'Aloc')
    call UnitAddAbility(U2, TF_Chaos_Ability_Id())
    call AttachObject(U2, "TF Past Self", U)
    call TF_Hero_Set(U, U2)
    call GroupAddUnit(G, U2)
    call AttachObject(U, "TF Future Self", U2)
Also, try adding the 'Ward' classification; I know it removes the command card, but I'm not sure about whether or not that actually prevents the unit from being ordered.
08-20-2009, 02:32 PM#6
Here-b-Trollz
Quote:
Originally Posted by Pyrogasm
Also, try adding the 'Ward' classification; I know it removes the command card, but I'm not sure about whether or not that actually prevents the unit from being ordered.

You would need to block the "smart" order, too. With AbortOrder, this is much much much easier.
08-20-2009, 04:03 PM#7
Pinzu
with ward thing, you can still move them, by pressing the target ground or enemy.

so, I make it a ward, and block all orders given by the owning player, how do I differ from the "AI" orders and the players order?

I will soon start testing your stuff.
08-20-2009, 04:44 PM#8
Pinzu
Collapse JASS:
    
    call UnitAddAbility(U2, 'Aloc') 
    call UnitAddAbility(U2, TF_Chaos_Ability_Id()) 

//whats the "TF_Chaos_Ability_Id"? a pre-set variable cus I am just implenting customscripts
//into gui, yes, im that kind of newbie ;)

    call AttachObject(U2, "TF Past Self", U)
    call AttachObject(U, "TF Future Self", U2)
08-20-2009, 05:05 PM#9
Vexorian
Quote:
with ward thing, you can still move them, by pressing the target ground or enemy.
not really.
08-20-2009, 05:30 PM#10
Pinzu
Im sure and Im even gonna try by giving a shadow hunter: serpent ward movment speed.

- you could move them. /... and I ment by right-clicking.
08-20-2009, 08:59 PM#11
Pyrogasm
That was just the example code from my Temporal Fluxuation spell. TF_Chaos_AbilityId is a function at the top of the script, which I linked too.