This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:guides:beginners:objects [2018/02/14 04:47 (8 years ago)] – ↷ Page moved from guides:beginners:objects to en:guides:beginners:objects iarwain | en:guides:beginners:objects [2025/09/30 17:26 (8 weeks ago)] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| Our platform game is going to need a hero. Let's replace the default object in our game with a hero object. | Our platform game is going to need a hero. Let's replace the default object in our game with a hero object. | ||
| - | We will need a graphic image for the hero. One is available in the data\object assets folder | + | We will need a graphic image for the hero. There' |
| {{ : | {{ : | ||
| - | First we need to create a graphic config that knows about the soldier.png image: | + | Copy this file into your '' |
| + | |||
| + | Next, we need to create a graphic | ||
| < | < | ||
| Line 21: | Line 23: | ||
| [HeroObject] | [HeroObject] | ||
| Graphic | Graphic | ||
| - | Position = (50, 400, 0) | + | Position = (-350, 100, 0) |
| Scale = 2 | Scale = 2 | ||
| </ | </ | ||
| - | When a HeroObject is created in code, he will be placed at co-ordinates | + | When a HeroObject is created in code, he will be placed at co-ordinates |
| - | In code, replace the default object | + | In the Init() function, replace the '' |
| < | < | ||
| Line 37: | Line 39: | ||
| {{: | {{: | ||
| - | So that's great! Now you might be wondering, how does HeroGraphic know how to get solder.png from the data\objects | + | So that's great! Now you might be wondering, how does '' |
| < | < | ||
| [Resource] | [Resource] | ||
| - | Texture = ../data/object | + | Texture = ../data/texture |
| </ | </ | ||
| Line 50: | Line 52: | ||
| ---- | ---- | ||
| - | Next: [[guides: | + | Next: [[en:guides: |
| - | {{section> | + | {{section> |