Page 1 of 1

container not working in RPG

Posted: January 18th, 2013, 7:14 pm
by Ghostman Gaming
I wrote this code

Code: Select all

r_container_name "Exoacutioner"
r_container_script 15
r_container_mdl "ogre/guard"

Code: Select all

//exacutioner

r_script_signal spawn [
	r_additem self 1 (rnd 4)
]

r_script_signal interact [
	r_chat self (? (r_get_amount self 1) 1 0)
]


r_script_say "[The guard looks at you and asks "any last requests?]" [ //1

	r_response "[grab his sword and kill him]" (? (r_get_amount player 7) 10 9)
]


r_script_say "[???: You grab his sword from its stealth and slice his head clean off.]" [ //10
	r_response "[Face your next attacker]" -1 [
		dmg  = (+ (rnd (r_get_amount talker 1)) 1)
		r_additem player 7 $dmg
		r_additem player 1 (- (r_get_amount talker 1) $dmg)
		r_destroy talker
	]
]
its pretty simple the player is supost to kill the guy with the guys sword then take the sword i do not know what i did wrong i get the error message no such dialogue node:1 :twisted:

Re: container not working in RPG

Posted: January 18th, 2013, 10:30 pm
by Hirato
http://www.sandboxgamemaker.com/wiki/in ... _first_NPC
consult part 2 of the RPG tutorial, the syntax for defining dialogue nodes has changed.

Otherwise, you'll want to change the dialogue too, so it's less of an apparent rip of the apple trees.
The code used there is quite inappropriate for what you're doing, and to be honest, so is the use of a container over a critter.