Sleeping enemies

Discuss Artificial Intelligence and Bot programming.
Post Reply
mofu23
Posts: 9
Joined: Thu Mar 14, 2013 10:11 pm
Location: That one place

Sleeping enemies

Post by mofu23 »

Pikmin features dozens of creatures that fall asleep (or don't show up for a while) until the captin or pikmin disturb their sleep. I am not entirely sure if Kurok or PSP quake can handel this kind of activity but if anyone knows how to do it, please help me out with this.
Thanks in advance.
drm_wayne
Posts: 232
Joined: Sat Feb 11, 2012 5:47 pm

Re: Sleeping enemies

Post by drm_wayne »

make idle animations sleeping, and when touching him / make noise he will getup and follow you, easy as cake.
mofu23
Posts: 9
Joined: Thu Mar 14, 2013 10:11 pm
Location: That one place

Re: Sleeping enemies

Post by mofu23 »

drm_wayne wrote:make idle animations sleeping, and when touching him / make noise he will getup and follow you, easy as cake.
Is there some kind of code that goes with this or is it just animations
gnounc
Posts: 428
Joined: Mon Apr 06, 2009 6:26 am

Re: Sleeping enemies

Post by gnounc »

This may be of interest to you.

in w_attack in weapons.qc

Code: Select all

self.show_hostile = time + 1;	// wake monsters up
metlslime
Posts: 316
Joined: Tue Feb 05, 2008 11:03 pm

Re: Sleeping enemies

Post by metlslime »

rubicon2 has code for a "sleeping" monster_floyd. I added a new spawnflag and it modifies the AI so they don't wake up you unless directly damaged or triggered by scripting (e.g. grabbing an item.) I also have a different animation loop and skin frame (so the normally glowing visor is dark)
Post Reply