Stendhal NPC Coding: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
imported>Kymara No edit summary |
imported>Kymara No edit summary |
||
| Line 128: | Line 128: | ||
We set its outfit either by: |
We set its outfit either by: |
||
* setting its class to a PNG image that exists at ''data/sprites/npc'', e.g. <code>npc.setEntityClass("welcomernpc");</code> |
* setting its class to a 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> |
* setting its outfit with setOutfit method e.g. <code>npc.setOutfit(new Outfit(0, 05, 01, 06, 01));</code>. See [[StendhalOpenTasks#Player's outfits| How to know player's outfits specifications]] |
||
See [[StendhalOpenTasks#Player's outfits| How to know player's outfits specifications]] |
|||
Finally set its initial position and its HP. Don't worry for your NPC. It can't be attacked nor killed. |
Finally set its initial position and its HP. Don't worry for your NPC. It can't be attacked nor killed. |
||