It is currently Wed Nov 19, 2008 3:58 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 6 posts ] 

How do you think NPCs should behave?
As they do now, where Move( ) will only change facing if a direction different than the current facing is supplied. 14%  14%  [ 2 ]
I'd like to see a seperate Face( ) function that only changes the facing, and for Move( ) to move the NPC regardless of the current facing direction. 64%  64%  [ 9 ]
I don't care either way, but I'd like to see a photo of Austin in bikini briefs included in the 098 distro. 21%  21%  [ 3 ]
Total votes : 14
Author Message
 Post subject: POLL: Considering changes to NPC Move( )
PostPosted: Sun Apr 06, 2008 7:06 pm 
Offline
POL Developer

Joined: Mon Jan 30, 2006 8:10 am
Posts: 144
I'm considering a change to NPCs and I wanted to get user feedback before I go and change anything. As things currently stand, "Movement" is defined as either a change in facing or position. For Frozen and Paralyzed, this makes perfect sense and should not be changed. However, it leads to some peculiar behaviors. For instance, if an NPC is facing NW and the script tells it to Move( N ), the NPC will not walk north, but will only face that direction. This is commonly seen in Move( ) where a direction is not passed in, but rather a bounding box. NPCs will "sit and spin" 7 times out of 8, and only move forward if the Random Direction it chooses happens to match its original facing direction. Needless to say, this doesn't do much to give the illusion of "life" to our NPCs. ;-)

Many of us have scripted around this issue with little jobbies like this:
Code:
var dir := RandomInt( 8 );
npc.facing := dir;
Move(dir);

or worse if they are to be constrained in bounding boxes.

So what I propose is to separate "Movement" (except in the previously mentioned Frozen and Paralyzed states) into two functionalities: Face( ) and Move( ). Face( ) will only ever adjust the NPCs facing attribute (exactly like altering npc.facing directly). Move( ) would cause the NPC to change location, regardless of its previous facing direction. In the above example, Move( N ) would cause the NPC to walk one space north, adjusting his facing in the process, even though he was facing NW before.

The other devs will be giving me feedback on the issue, and letting me know any technical reasons for or against the change that I may be unaware of, but I'd also like you, the users, to provide feedback as well. So please take a second, cast a vote, and leave a comment or question if you are so inclined.

Cheers. :cool:


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 06, 2008 7:25 pm 
Offline
POL Developer
User avatar

Joined: Sun Feb 05, 2006 7:20 pm
Posts: 54
I think this is a good idea. I find it unlikely that it would break many scripts- how many people are using Move to change facing only? (Which I suppose is what this poll hopes to find out.) And in the meantime it makes the behavior more like what is probably expected.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 07, 2008 2:40 am 
Offline
User avatar

Joined: Fri Feb 10, 2006 12:15 am
Posts: 225
Separating facing from movement is a good idea. I can not think of any reason why it shouldn't have been like that all the time.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 07, 2008 3:42 am 
Offline
Packet Maintainer

Joined: Thu Feb 02, 2006 8:33 am
Posts: 319
That's a good idea. I personally have another suggestion for general npc movement, but i'll put that into the feature suggestion forum later.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 07, 2008 2:22 pm 
Offline
POL Developer
User avatar

Joined: Sun Feb 05, 2006 7:20 pm
Posts: 54
ncrsn wrote:
Separating facing from movement is a good idea. I can not think of any reason why it shouldn't have been like that all the time.


I'm not sure, not speculation is that it was set up this way back before there was write access to .facing.

Ok, that doesn't answer the question of why it wasn't seperated at the time. I really have no idea. :)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 23, 2008 6:35 pm 
Offline

Joined: Tue Apr 22, 2008 6:09 am
Posts: 67
Code:
var dir := RandomInt( 8 );
npc.template := :brainAI:Austin;
npc.usebikini := true;
npc.facing := dir;
Move(dir);

:)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl