Change font size
It is currently Thu Jun 27, 2019 1:01 am

Forum rules


{L_IMAGE}



Post a new topicPost a reply Page 2 of 4   [ 34 posts ]
Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject: Re: Pointing your nose..
PostPosted: Tue Aug 30, 2011 9:16 pm 
Furious Typer
User avatar

Joined: Mon Aug 10, 2009 11:53 pm
Posts: 258
just a note on the multiple avatars... once you have made an npc - you can just copy the notecard and then create another, and another.. each time creating a new notecard, making a copy of it in your inventory.

Then you can just rename them accordingly i.e. NPC1,2,3 or Female1,2, Male1,2 etc.

You can then place all of the notecards inside of the same prim, and call up whichever NPC you like using the same command. It will auto-assign a new UUID each time you spawn a new npc and you can just capture it for future use in your script.

An example would be a list sort of like the one I used for my sim stress test here:
{L_CODE}:
for (x = 0;x < 199; x++){
    destX = (integer) llFrand (60)-30; // Creates an area from +30 to -30 X coord around center
    destY = (integer) llFrand (60)-30; // Creates an area from +30 to -30 Y coord around center
    npc = osNpcCreate ("Luke", "Endemirror", llGetPos()+<destX, destY, 0>, "appearance");
    npcList += npc;
}


Of course not that you probably want to create an army of same named clones, but you get the idea :mrgreen:

_________________
Sorry, I was just thinking upon the immortal words of Socrates who said ... "I drank what?? ... "
- Real Genius


Top
 Profile  
 
 Post subject: Re: Pointing your nose..
PostPosted: Tue Aug 30, 2011 9:52 pm 
Furious Typer
User avatar

Joined: Fri Aug 19, 2011 7:10 pm
Posts: 240
Location: UK
If you want all your NPCs to look the same, you can re-use the same notecard - you don't need multiple copies of it.

_________________
50's sim based at Rumbled on OSGrid
happily running on Debian Linux on a VPS since June 10 2013


Top
 Profile  
 
 Post subject: Re: Pointing your nose..
PostPosted: Wed Aug 31, 2011 2:06 am 

Joined: Wed Aug 17, 2011 2:51 am
Posts: 41
Haplo, what is the name of the region where these experiments are taking place?


Top
 Profile  
 
 Post subject: Re: Pointing your nose..
PostPosted: Wed Aug 31, 2011 7:26 am 
Furious Typer
User avatar

Joined: Mon Aug 10, 2009 11:53 pm
Posts: 258
Roken Price {L_WROTE}:
If you want all your NPCs to look the same, you can re-use the same notecard - you don't need multiple copies of it.


I wan't implying you need multiple copies of a notecard for the same NPC - I was simply saying that for every NPC you make (individual notecard or not) you can just capture their key into a list or however you like so you can control multiple NPCs from the same script.

I just put that snippet in their to show how I had captured around 200 npcs into one list. They all used the same notecard obviously.

I was suggesting that since it generates a notecard for each NPC. You are able to put many different notecards inside of a prim that represent a different NPC for each. Then load any one of them anytime you need, or multiple at a time - without the need for a prim-per-npc.

Many people I've talked to are under the assumption it's one prim, one NPC. Just pointing it out was all. :)

_________________
Sorry, I was just thinking upon the immortal words of Socrates who said ... "I drank what?? ... "
- Real Genius


Top
 Profile  
 
 Post subject: Re: Pointing your nose..
PostPosted: Wed Aug 31, 2011 7:28 am 
Furious Typer
User avatar

Joined: Mon Aug 10, 2009 11:53 pm
Posts: 258
Void Pipe {L_WROTE}:
Haplo, what is the name of the region where these experiments are taking place?


I have one setup called:

Haplhazard

Feel free to stop by anytime you like. Nothing special. Right now all I have out is the watchdog NPC like I posted above.

_________________
Sorry, I was just thinking upon the immortal words of Socrates who said ... "I drank what?? ... "
- Real Genius


Top
 Profile  
 
 Post subject: Re: Pointing your nose..
PostPosted: Fri Sep 02, 2011 4:53 pm 
Furious Typer
User avatar

Joined: Fri Aug 19, 2011 7:10 pm
Posts: 240
Location: UK
I had cause to look at the script more closely, and in particular the test for how close (or how far) the target AV was from the NPC. This is more accurate, and as far as I can tell, doesn't give a performance hit:

Replace:

{L_CODE}:
if (llFabs(vecTo_targ.x - nPos.x) > 5 || llFabs(vecTo_targ.y - nPos.y) > 5) {


With:

{L_CODE}:
if (llFabs(llVecDist(vecTo_targ, nPos)) > 5) {

_________________
50's sim based at Rumbled on OSGrid
happily running on Debian Linux on a VPS since June 10 2013


Top
 Profile  
 
 Post subject: Re: Pointing your nose..
PostPosted: Sat Sep 03, 2011 2:06 pm 
Furious Typer
User avatar

Joined: Fri Aug 19, 2011 7:10 pm
Posts: 240
Location: UK
OK, I've got this working now. If anyone wants to see the NPCs in action, pop along to Rumbled.

The two dancing NPCs and the bartender are just dumb NPCs, but Angela Bot is a little more interesting, having combined the modified watchdog script and a chatbot script, she will not only annoy you by following you, but if you talk to her (just talk in open chat) she will psychoanalyse you (because she gets her responses from Eliza).

I've restricted the watchdog script to within 30 meters, so if you are further away than that she will leave you alone, and chat works only within chat range (10m) of course.

NB. The sim will be down for 11 days from around Midday GMT on 6 September until 17 September, so avoid going during this period.

_________________
50's sim based at Rumbled on OSGrid
happily running on Debian Linux on a VPS since June 10 2013


Top
 Profile  
 
 Post subject: Re: Pointing your nose..
PostPosted: Sun Sep 04, 2011 7:01 am 
OSG Elite
User avatar

Joined: Thu Dec 11, 2008 7:51 am
Posts: 391
Location: England UK
Hi Roken,

Have you gotten the avatar to face the correct direction when standing? If so can you please post the extract of the script that needs changing, or post your whole script.

Thanks!

_________________
"Nothing lasts forever; It's scientific"
~David Byrne (Talking Heads)


Top
 Profile  
 
 Post subject: Re: Pointing your nose..
PostPosted: Sun Sep 04, 2011 7:04 am 
Furious Typer
User avatar

Joined: Fri Aug 19, 2011 7:10 pm
Posts: 240
Location: UK
Unfortunately not, yet. I did completely remove the rotation correction which does, in my case, produce a slightly more natural direction.

TBH it's not something I've looked at in any great detail yet, but I'll probably make it the next bit to look at. Once I nail it, I'll post.

_________________
50's sim based at Rumbled on OSGrid
happily running on Debian Linux on a VPS since June 10 2013


Top
 Profile  
 
 Post subject: Re: Pointing your nose..
PostPosted: Sun Sep 04, 2011 12:02 pm 
OSG Elite
User avatar

Joined: Thu Dec 11, 2008 7:51 am
Posts: 391
Location: England UK
Hi Roken,

I took a look at your region with your NPC's running. It is cool seeing the bar tender etc as actual avatars, though the chat bot script seems to make no sense at all lol. Maybe I was asking the wrong questions? ;)

What kind of load on the sim are you getting with just those 4 NPC's? I'll probably be looking to run upto 20 at some point in the future on a project I'm working on, though I was considering using a sensor to rez/derez the NPC's only when needed i.e. when an actual avatar is within say 40 meters of where an NPC would be. A few of these would be 'tour guides' scripted to show visitors about the region. I have created a couple of (really rough) scripts to 'record' my main avatar's movements, then the NPC plays them back. I will be posting them when I have cleaned them up a bit.

Nice wotk with the NPC's though, Roken :)

_________________
"Nothing lasts forever; It's scientific"
~David Byrne (Talking Heads)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 2 of 4   [ 34 posts ]
Go to page Previous  1, 2, 3, 4  Next


Who is online

Users browsing this forum: No registered users and 1 guest


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
610nm Style by Daniel St. Jules of Gamexe.net