Page 1 of 2

Need help about talking to NPC

Posted: December 21st, 2011, 10:20 am
by azure11
Please help me how to talk with NPC, I have read FAQ, other question in forum and follow the tutorials but i still can't talking with NPC.
The tutorials is for version 2.5 whilst i'm using 2.6.1 (http://www.sandboxgamemaker.com/wiki/in ... ript_guide) i have follow the tutorials but nothing happen.
Please help me and help me too about making enemies that can killed and attack player.

Many thanks to you....

Re: Need help about talking to NPC

Posted: December 26th, 2011, 2:21 pm
by chocolatepie33
if this is for FPS mode, then let me see your code so I can explain to you what went wrong, also maybe you should break down what you did into step-by-step stuff, to see if you missed anything important. I think I'm gonna have to go and fix that tutorial.
azure11 wrote:Please help me and help me too about making enemies that can killed and attack player.
Also, by the sounds of it, you're working with RPG mode. the two modes (FPS and RPG) have different scripting languages.

Re: Need help about talking to NPC

Posted: December 28th, 2011, 7:33 pm
by azure11
Sorry for late reply.
Yes I'm making RPG game using Sandbox, I don't know how to make NPC talking and enemies. May be you can give me script so I can learn from it.
Thank you.

Re: Need help about talking to NPC

Posted: January 14th, 2012, 9:56 am
by azure11
Ok now i know how to make NPC script to talk, but i have a new problem, the problem is when i interact to NPC (E) there is a message says "script is not defined or being loaded". Can anyone what's wrong with my script?

This is my script: //Hasyawau's script

r_script_signal interact [
r_script_say "Hello, how are you doing" [ // 0 - it's good practice to number your entries
r_response "I'm well, yourself?" 1 //goes to dialogue #1
r_response "Goodbye" -1 //closes the dialogue ]
]

r_script_say "I'm glad to hear it" [ // 1
r_response "Goodbye" -1]
]


Please someone help me. I'm using Sandbox 2.7.1

Re: Need help about talking to NPC

Posted: January 14th, 2012, 9:56 am
by azure11
Ok now i know how to make NPC script to talk, but i have a new problem, the problem is when i interact to NPC (E) there is a message says "script is not defined or being loaded". Can anyone what's wrong with my script?

This is my script: //Hasyawau's script

r_script_signal interact [
r_script_say "Hello, how are you doing" [ // 0 - it's good practice to number your entries
r_response "I'm well, yourself?" 1 //goes to dialogue #1
r_response "Goodbye" -1 //closes the dialogue ]
]

r_script_say "I'm glad to hear it" [ // 1
r_response "Goodbye" -1]
]


Please someone help me. I'm using Sandbox 2.7.1

Re: Need help about talking to NPC

Posted: January 14th, 2012, 9:56 am
by azure11
Ok now i know how to make NPC script to talk, but i have a new problem, the problem is when i interact to NPC (E) there is a message says "script is not defined or being loaded". Can anyone what's wrong with my script?

This is my script: //Hasyawau's script

r_script_signal interact [
r_script_say "Hello, how are you doing" [ // 0 - it's good practice to number your entries
r_response "I'm well, yourself?" 1 //goes to dialogue #1
r_response "Goodbye" -1 //closes the dialogue ]
]

r_script_say "I'm glad to hear it" [ // 1
r_response "Goodbye" -1]
]


Please someone help me. I'm using Sandbox 2.7.1

Re: Need help about talking to NPC

Posted: January 14th, 2012, 10:57 am
by kddekadenz
Trololol... Triple post :lol:

You need to create a critter (write a cfg in data/rpg/games/yourgame/critters) with r_char_script x inside.

Insert for x the number of your script in data/rpg/games/yourgames/scripts.

Hope this helps ;)

Re: Need help about talking to NPC

Posted: January 14th, 2012, 11:45 am
by Hirato
ooh, you're quite close.
His problem is that his script ISN'T inside data/rpggames/yourgame/scripts, but rather elsewhere, hence those error messages.

Re: Need help about talking to NPC

Posted: January 14th, 2012, 11:49 am
by kddekadenz
Hirato, how the consumables and armor work?
I declared for example an apple as consumable, but cannot eat it :?

Re: Need help about talking to NPC

Posted: January 14th, 2012, 10:18 pm
by Hirato
consumables aren't implemented yet, I'll leave a more thorough answer here
viewtopic.php?t=3495