HowToAddMapsServerStendhal: Difference between revisions
Content deleted Content added
imported>MiguelAngelBlanchLardin No edit summary |
imported>MiguelAngelBlanchLardin No edit summary |
||
Line 10:
Now you need to create the stend map files. There are two options:
The later is prefered as it will also update world.tmx graphics.
Line 133:
zone.addNPC(npc);
</pre>
Use '''npcs.add()''' as this way the NPC is added to a list of NPC from where you can later obtain it for adding more dialogues for quests. Make sure the name you give to your NPC is unique.
Just after that it is a good idea to create a path that the NPC will follow on that area.
And then create a dialog. Dialogs and such are explained in Quest sections.
Now simply assign an id to the npc, set it outfit either by:
* setting its class to a PNG image that exists at ''data/sprites/npc''
* setting it outfit with setOutfit method.
Finally set its initial position and its HP. Don't worry for your NPC. It can't be attacked nor killed.
Once that is done add the NPC to zone using ''zone.addNPC()'' method.
Congrats you have populated your new zone.
| |||