Putting a thing to sleep

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
Risen
Posts: 5263
Joined: Thu Jan 08, 2004 1:02 pm
Location: N44°30' W073°05'

Putting a thing to sleep

Post by Risen »

Is there any way I can put a monster back to 'sleep' via ACS after it has woken? Thing_deactivate isn't providing what I need.
User avatar
Enjay
 
 
Posts: 27285
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Post by Enjay »

Might you be able to use thing_hate with hate type 5 to get it to hate something but ignore the player, and just leave the "something" out of sight? Or would it continue to wander around if already awake?

Perhaps another option could be to create a monster with an A_JumpIfInventory statement. When you give it an item via ACS, it could jump to its spawn state?
User avatar
Phobus
Posts: 5984
Joined: Thu May 05, 2005 10:56 am
Location: London
Contact:

Post by Phobus »

They seek out their hate target if they're awake, so it'd look like it's trying to find the ever elusive secret door for you... without the wall hump sound effects.
User avatar
Risen
Posts: 5263
Joined: Thu Jan 08, 2004 1:02 pm
Location: N44°30' W073°05'

Post by Risen »

Tried the former; it was as Phobus said. I haven't tried the latter; I generally avoid messing with state jumping much for standard Doom AI... Graf Zahl often states it has unpredictable results.
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

What if there aren't any actors in the map with the tid you tell it to hate?
User avatar
Ichor
Posts: 1784
Joined: Wed Jul 23, 2003 9:22 pm

Post by Ichor »

I'll have to test this later today to make sure, but I think in order to use Thing_Deactivate on something, you have to first make it dormant (or inactive for things like torches) and then use Thing_Activate on it.
User avatar
Risen
Posts: 5263
Joined: Thu Jan 08, 2004 1:02 pm
Location: N44°30' W073°05'

Post by Risen »

I've changed my approach so this specifically isn't an issue for me any longer. (However, the lack of a Line-of-sight check is a much bigger issue now...)
Locked

Return to “Editing (Archive)”