- Joined
- May 2, 2009
- Messages
- 69
Hey, I need help to turn off a unit's auto attack. I want it so you have to right click somebody to have your unit attack them.
Plz help soon.
Plz help soon.
NEVER in the hell use waits...You must use action Wait 0.00 seconds
- unit is ordered
- Events
- Unit - A unit Is issued an order targeting an object
- Conditions
- (Ordered unit) Equal to (You unit with "fake" attack - chain lightning)
- Actions
- Wait 0.00 seconds
- Unit - Order (Ordered unit) to Orc Far Seer - Chain Lightning (Target unit of issued order)
I think it is better than WarCraft crashNEVER in the hell use waits...
Player groups do not leak.I think it is better than WarCraft crash
i don´t really care what some people are saying,like removing player groups can cause some leaks,and you need 1000000 to make that leak that will cause lags
It will work everytime, but the smoothest wait is 0.27 seconds, thats Blizzards dumb fault.waits are working on some events,like unit dies,you can wait 15 sec and it will work
I would use timers...besides,how would you order ordered unit to attack if you don´t use wait?
scope TheAttack
struct Attack
static unit theUnit = null
static timer theTimer = CreateTimer()
public static method releaseAttack takes nothing returns nothing
// Do whatever you want...
endfunction
public static method create takes unit u returns Attack
Attack.theUnit = u
call TimerStart(Attack.theTimer, 0.01, false, function Attack.releaseAttacK)
endmethod
endstruct
endscope
or you could add classification - worker
This has already been said..give the unit worker clasification?
that will prevent it from attacking
They do leak but very samll,you need 1.000.000 to see thatPlayer groups do not leak.
its that stupid worker icon i guess....This has already been said..