Forum

> > Stranded II > General > NPC problem
Forums overviewStranded II overviewGeneral overviewLog in to reply

English NPC problem

3 replies
To the start Previous 1 Next To the start

old NPC problem

sny420
User Off Offline

Quote
I'm making a map in the editor but I'm having a bit of trouble with the npcs. I'm trying to add one of each of the humanoid npcs (pirate, professor, etc.). The problem is that when I add them and then try to talk to them in-game nothing happens. I found scripts for them in the sys/scripts folder, but even after I add the script to each one I still can't talk to them in-game. What am I missing here? Do I need to make a global script? or maybe add/change something in the individual npc's scripts?

old Re: NPC problem

Raven Shadow
User Off Offline

Quote
sny420 has written
I'm making a map in the editor but I'm having a bit of trouble with the npcs. I'm trying to add one of each of the humanoid npcs (pirate, professor, etc.). The problem is that when I add them and then try to talk to them in-game nothing happens. I found scripts for them in the sys/scripts folder, but even after I add the script to each one I still can't talk to them in-game. What am I missing here? Do I need to make a global script? or maybe add/change something in the individual npc's scripts?


You need to attach the apropriate script file to them.
When placing a unit in the editor, left click on them after
placing, and a properties windows will open for that unit.

In the scripts area of that window you have to
type in the load command for the correct script file for
that npc.

For the Chieftain, you'd use:
1
2
3
on:use {
	dialogue "start","sys/scripts/random_char_chieftain.s2s";
}

For the Hempguy, you'd use:
1
2
3
on:use {
	dialogue "start","sys/scripts/random_char_hempguy.s2s";
}

For the Native, you'd use:
1
2
3
on:use {
	dialogue "start","sys/scripts/random_char_native.s2s";
}

For the Pirate, you'd use:
1
2
3
on:use {
	dialogue "start","sys/scripts/random_char_pirate.s2s";
}

For the Proffessor, you'd use:
1
2
3
on:use {
	dialogue "start","sys/scripts/random_char_prof.s2s";
}

old Re: NPC problem

HudaJan
Super User Off Offline

Quote
Yes you need to assign script to each individual unit.
Use s2 cmd dialogue
You know the way to the dialogue and you know the name of the script so it shouldn't be a problem
EDIT: Too late
To the start Previous 1 Next To the start
Log in to replyGeneral overviewStranded II overviewForums overview