| 09-18-2002, 09:32 AM | #1 |
Guest | When player #1 puts a unit of player #12's to sleep, I can't seem to figure out if player #12's unit is sleeping even though he's plainly asleep (i.e., Z's over his head and he doesn't move). How do I tell? Thanks for any help. |
| 09-18-2002, 09:40 AM | #2 |
Guest | Someone else had a problem like this, and I don't think we ever found a way to see if the unit is sleeping. The Unit - Unit is sleeping boolean condition doesn't work for units that are put to sleep by a spell. |
| 09-18-2002, 03:14 PM | #3 |
Guest | Yeah, in the greyed out text you see when you're adding that check to the GUI it says something about units of players 1-12 never sleep. I can't believe that sleeping is not sleeping. Any ideas on intercepting the sleep targeting object order and cancelling it, replacing with custom behavior? What's the best way to cancel an order? Care. |
| 09-18-2002, 04:07 PM | #4 |
<hero> is issued an order targeting an object. Order = sleep Add <Targeted unit> to <Sleeping unit group> Wait <duration of sleep> Remove <Targeted unit> from <Sleeping unit group> i think that could work, or something like that |
| 09-18-2002, 04:12 PM | #5 | |
Guest | Quote:
Is <duration of sleep> a fixed integer that applies to all units? If so, it won't work if the units gets attacked while sleeping (cos the trigger will still think the unit is asleep). |
| 09-18-2002, 04:37 PM | #6 |
then make a trigger that if the unit is in <Sleeping unit group> and he gets attacked, remove him from <Sleeping unit group> simple |
| 09-18-2002, 05:39 PM | #7 |
Guest | This won't work. But here is an excellent example of something along those lines: http://forums.battle.net/war3-maps/posts/fr/17347.shtml It's just that for me, the exceptions (see above link) are unacceptable. I'd much rather intercept the order to sleep a target, cancel it, then manually do what I need to do to the target by say, pausing it and putting the 'Zzz' over it's head. A few problems present itself with that method. First of course is how to cancel a unit's order. Immediately. Second is, can a paused unit be moved, and have animations played? You see I want my slept units to be able to "sleepwalk". Heh heh. I'm going to try and see what happens if I change ownership of a slept unit to Neutral Hostile, then if it gets attacked or wakes up, return ownership to the original player. By making it Neutral Hostile I should be able to check the sleep status of the unit, something I don't believe you can do with player slots 1-12. But then, can you move and animate a sleeping unit? Guess I'll have to find out.... Care. |
