Hi! Welcome to the forum for Platinum Arts Sandbox Free 3D Game Maker. I currently have the forums locked as I am attempting to properly update them.

In the meantime please join the new Discord Server!

If you have any questions please e-mail me through the Platinum Arts website.

Interaction With NPCs - help me!

Having issues not related to a specific Sandbox game mode? Get help here!
Please also read the rules for support when posting support requests.
Failure to comply with the forum rules may result in your topic being locked without resolution.
Locked
malkin61
Member
Member
Posts: 21
Joined: February 25th, 2010, 8:03 am

Interaction With NPCs - help me!

Post by malkin61 »

Hi all,

Just started using sandbox and I'm intending to use it at the college I teach at for my next unit - Computer Games Development. In order to teach effectively I need to know more than the students and be able to help them get the most out of sandbox and actually build the games they design.

I'm ok with making maps and I'm currently building a spaceship map. I've figured out how to open doors thanks to a post on here. But I am completely at a loss when it comes to creating / spawning NPCs that I can interact with. Someone has posted some code here for making a guard you can talk to but I don't even know where it goes! :oops:

So, are there any books or publications I can get at to help me with this - and I guess all the other hundreds of questions I'm going to get asked....?

If anyone wants to post some help as well it will gratefully recieved :)

Thanks

Malk
arcones
Support Team
Support Team
Posts: 2734
Joined: January 13th, 2010, 12:42 pm
Name: Timothy
IRC Username: I use Steam
Location: Looking over your shoulder...
Contact:

Re: Interaction With NPCs - help me!

Post by arcones »

Hi Malk!

Usually you would create a cfg with the same name as your map. So, "yourmapname.cfg" (ie "City.cfg")
I haven't tried that myself (it's been posted somewhere else on the forum).

I use F6 (or F7 I can't remember which button it is... :oops: ) which pulls up the cfg in game so that I can work on it there. Any other code you create would be written in the cfg as well.
NOTE: Unless you have the development version of Sandbox the NPC chat won't work without some rearranging. (for the reason r_face doesn't work yet)

I hope that helps Malk!

Arc :geek:

BTW Three-hundredth post!!!!!! WOOT :D
Image
Want a user bar like this one? PM Leo!
malkin61
Member
Member
Posts: 21
Joined: February 25th, 2010, 8:03 am

Re: Interaction With NPCs - help me!

Post by malkin61 »

Thanks for the response Arc.

I still don't understand. How do I define where my npc will spawn? And what is the script I use? And what if there's aready a cfg named after your map? Beginning to think I've biten off more than I can chew here. Everyone says how easy it is, but it doesn't feel that right now!
arcones
Support Team
Support Team
Posts: 2734
Joined: January 13th, 2010, 12:42 pm
Name: Timothy
IRC Username: I use Steam
Location: Looking over your shoulder...
Contact:

Re: Interaction With NPCs - help me!

Post by arcones »

Hey, don't worry Malk! I had this trouble for the longest time! :) I haven't gotten on SB for a week or more so I can't remember for sure which F6 or F7 it is... but then start typing the code in there, and when you're done, click save. (BTW a green screen pops up and at the top it says notepad)

The script used is Cubescript. And you definitely have to wrestle with it :D I haven't worked much with the NPC chat because I don't have the dev version... :(

As for the NPC, it is has been my opinion that you spawn the NPC somewhere on the map yourself... i.e. I'm gonna place NPC Bob on top of the wall. Then I'm going to write the code in, name the NPC in the coding "Bob" and hopefully it'll work :P
I really hope that helps!

Arc :geek:

P.S. I'll try to look for more info on this topic!
Image
Want a user bar like this one? PM Leo!
malkin61
Member
Member
Posts: 21
Joined: February 25th, 2010, 8:03 am

Re: Interaction With NPCs - help me!

Post by malkin61 »

Thanks a lot Arc - I'll try this.. Cubescript.. I have a look as well. Thanks again
arcones
Support Team
Support Team
Posts: 2734
Joined: January 13th, 2010, 12:42 pm
Name: Timothy
IRC Username: I use Steam
Location: Looking over your shoulder...
Contact:

Re: Interaction With NPCs - help me!

Post by arcones »

Image
Want a user bar like this one? PM Leo!
Locked