Raised This Month: $ Target: $400
 0% 

Stopping monster movement.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Drak
Veteran Member
Join Date: Jul 2005
Old 04-06-2007 , 00:09   Stopping monster movement.
Reply With Quote #1

I'm trying to get monster's basicly to be frozen, he's what I tryed so far:
Code:
set_pev(entid,pev_flags,FL_FROZEN) // ---------------------------------------------------------- // set_pev(entid,pev_maxspeed,0.0) set_pev(entid,pev_speed,0.0)

Setting it's flags didn't do anything, but setting it's maxspeed/speed had a different effect, it stopped the monster from moving. But when using the monster to make it follow you (It's the Scientist NPC) he didn't move... But when using him again, he did.. Anyone have any idea?
It would also be really good if there was a way to make the NPC 'brain dead'. Something to basicly just freeze it, don't shoot, don't attack. blah blah.

EDIT:
Code:
set_pev(entid,pev_nextthink,0.0)
Using this along with the speed settings, it works fine. They won't move, but what if I wanted to re-vert it back?
__________________
Oh yeah

Last edited by Drak; 04-06-2007 at 00:24.
Drak is offline
Send a message via MSN to Drak
Drak
Veteran Member
Join Date: Jul 2005
Old 04-07-2007 , 01:54   Re: Stopping monster movement.
Reply With Quote #2

I really hate to bump my own thread, but anyone have any ideas?
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 04-07-2007 , 03:00   Re: Stopping monster movement.
Reply With Quote #3

If you're using the nextthink method, when you want to re-enable them, set their pev_nextthink to get_gametime() + 0.1
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
jurugi
Junior Member
Join Date: Apr 2005
Old 05-04-2007 , 19:21   Re: Stopping monster movement.
Reply With Quote #4

You might be able to set the monster as spawnflags:0 which makes it not attack anything, but still acts as a monster entity and reacts to sounds etc. and do what you're doing
jurugi is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 05-05-2007 , 04:22   Re: Stopping monster movement.
Reply With Quote #5

When dealing with flags don't perform simple set but use bitwise OR operator:
Quote:
set_pev(entid, pev_flags, pev(entid, pev_flags) | FL_FROZEN)
Also have you read hlsdk_const.inc?

Quote:
#define FL_FROZEN (1<<12) // Player is frozen for 3rd person camera
VEN is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:42.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode