Citizens2 icon indicating copy to clipboard operation
Citizens2 copied to clipboard

NPCs SmartLook Feature

Open qais8r opened this issue 12 years ago • 17 comments

If you have ever been to Mineplex, you would know that their NPCs don't use /npc look, but they look passive, and not frozen. So, SmartLook will basically make a NPC look like a passive, non-moving mob and/or player. Hope they add this.

qais8r avatar Nov 26 '14 19:11 qais8r

So what like... just looking around on its own, or...?

mcmonkey4eva avatar Nov 26 '14 19:11 mcmonkey4eva

Yes, I guess. Just looking around and not being frozen.

qais8r avatar Nov 26 '14 23:11 qais8r

This would be really easy through a Denizen script (Denizen: http://wiki.citizensnpcs.co/Denizen ). A script for it might be like this: http://mcmonkey.org/haste/11546 (Feel free to use that script if you like how it functions, it's just a quick throw-together though, and not incredibly realistic. We can work together to improve it if you're interested.)

mcmonkey4eva avatar Nov 27 '14 00:11 mcmonkey4eva

Would I paste the script as a '.txt' file? EDIT: Over some research, found out it's a '.yml' file. LOCKING: Thanks for the help! Adios! UNLOCKING: Help! It doesn't look real. It looks like it moves its head sideways every 10 seconds, according to the script. Please help.

qais8r avatar Nov 27 '14 03:11 qais8r

Yeah I said it wasn't that realistic as it stands. I suppose I could make it more reasonable this weekend when I have time... it'd help, in the mean time, if you explained in more detail what you expect realistic movement to look like? Perhaps a sample video or something like that to help clarify?

mcmonkey4eva avatar Nov 27 '14 04:11 mcmonkey4eva

Oh. Probably should have read the message entirely. Anyways, I want it to look at you, look away, turn around, that kinda thing. Here is a sample video I made. Sorry it took so long to respond. Turns out GitHub doesn't like MP4, so converting to GIF. Then, it was too big. Now, I'm uploading it as a private YouTube video. For some reason, I made a thumbnail for it, but it won't shot up since the video is private. How stupid of me. DERP! Here is the link: http://youtu.be/iL6mG8n0YaE

qais8r avatar Nov 27 '14 04:11 qais8r

Private videos are for you and only you to view. Also, this is incredibly easy to make in a Denizen script! Take what mcmonkey4eva gave you and edit it to your liking, add some math to make the head turn slowly and randomly.

adambkehl avatar Nov 27 '14 05:11 adambkehl

Can't view private videos... because they're private... perhaps you meant to upload as unlisted?

EDIT: Darn ninjas

mcmonkey4eva avatar Nov 27 '14 05:11 mcmonkey4eva

Fixed Also, @OzOwnz, I want them to sometimes stare at you, like a passive pig. @mcmonkey4eva, please reply.

qais8r avatar Nov 27 '14 05:11 qais8r

_QUESTION:_ Is anyone replying anymore?

qais8r avatar Nov 27 '14 21:11 qais8r

I see what you mean now, will work on this weekend.

mcmonkey4eva avatar Nov 27 '14 22:11 mcmonkey4eva

@mcmonkey4eva - Yippee! But don't you feel like this should be a feature in Citizens?

qais8r avatar Nov 28 '14 02:11 qais8r

@mcmonkey4eva, is this still being developed?

qais8r avatar Dec 08 '14 05:12 qais8r

Ooooppps. My bad. I totally forgot. Sorry. I'll make a note to do this tomorrow.

mcmonkey4eva avatar Dec 08 '14 06:12 mcmonkey4eva

@mcmonkey4eva, no problem. I forget things, too.

qais8r avatar Dec 08 '14 16:12 qais8r

I think I might have messed up the script initializer here... but http://mcmonkey.org/haste/11916 is my first pass at doing the trick, it seems to have basic functionality: the NPCs look around randomly when flagged as smartlookers. I've caught them staring at me a few times, though I never explicitly coded that in. (Note: If you're running 1.8 Spigot, you'll need the latest dev build of Denizen due to a bug I just caught in the code used to rotate entities - http://ci.mineconomy.org/job/Denizen_Developmental/lastSuccessfulBuild/ )

mcmonkey4eva avatar Dec 08 '14 23:12 mcmonkey4eva

@mcmonkey4eva - Can't thank you enough for this. TESTING: Works.

qais8r avatar Dec 09 '14 03:12 qais8r