Stendhal NPC Coding: Difference between revisions
Content deleted Content added
imported>Kymara |
imported>Madmetzger |
||
| (19 intermediate revisions by 2 users not shown) | |||
Line 60:
*/
public void configureZone(final StendhalRPZone zone, final Map<String, String> attributes) {
buildNPC(zone
}
Line 68:
<source lang="java">
private void buildNPC(final StendhalRPZone zone
final SpeakerNPC npc = new SpeakerNPC("Mr Healer") {
protected void createPath() {
Line 134:
We set its outfit either by:
* setting its class to a [[StendhalRefactoringGraphics#NPCs|PNG image]] that exists at ''data/sprites/npc'', e.g. <code>npc.setEntityClass("welcomernpc");</code>
* setting its outfit with setOutfit method e.g. <code>npc.setOutfit(new Outfit(0, 05, 01, 06, 01));</code>
It is nice to set a description for when the player does ''Look''. If you don't set one, it will just say: ''You see [NPC Name].''
| |||