PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
POLL: Considering changes to NPC Move( )

 
Post new topic   Reply to topic    PenUltima Online Forum Index -> Development Discussion 097
Display posts from previous:   

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
Luth
POL Developer


Joined: 03 Oct 2007
Posts: 21

PostPosted: Sun Apr 06, 2008 11:06 pm    Post subject: POLL: Considering changes to NPC Move( ) Reply with quote

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. Wink

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

Author Message
Madman
POL Developer


Joined: 05 Feb 2006
Posts: 30

PostPosted: Sun Apr 06, 2008 11:25 pm    Post subject: Reply with quote

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.

Author Message
ncrsn



Joined: 10 Feb 2006
Posts: 107

PostPosted: Mon Apr 07, 2008 6:40 am    Post subject: Reply with quote

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.

Author Message
Pierce



Joined: 02 Feb 2006
Posts: 247

PostPosted: Mon Apr 07, 2008 7:42 am    Post subject: Reply with quote

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.

Author Message
Madman
POL Developer


Joined: 05 Feb 2006
Posts: 30

PostPosted: Mon Apr 07, 2008 6:22 pm    Post subject: Reply with quote

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. Smile

Author Message
BELL



Joined: 22 Apr 2008
Posts: 21

PostPosted: Wed Apr 23, 2008 10:35 pm    Post subject: Reply with quote

Code:
var dir := RandomInt( 8 );
npc.template := :brainAI:Austin;
npc.usebikini := true;
npc.facing := dir;
Move(dir);

Smile

Post new topic   Reply to topic    PenUltima Online Forum Index -> Development Discussion 097 All times are GMT - 4 Hours
Page 1 of 1

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty