This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:guides:beginners:platforms_and_texture_repeating [2019/02/19 15:53 (7 years ago)] – external edit 127.0.0.1 | en:guides:beginners:platforms_and_texture_repeating [2025/09/30 17:26 (8 weeks ago)] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 23: | Line 23: | ||
| And create it inside the Init() function with: | And create it inside the Init() function with: | ||
| - | < | + | < |
| + | orxObject_CreateFromConfig(" | ||
| orxObject_CreateFromConfig(" | orxObject_CreateFromConfig(" | ||
| </ | </ | ||
| Line 33: | Line 34: | ||
| Great. Next, the platform needs to be stretched out so that it acts like a platform and not just a simple box. You can do this by changing the '' | Great. Next, the platform needs to be stretched out so that it acts like a platform and not just a simple box. You can do this by changing the '' | ||
| - | < | + | < |
| [PlatformObject] | [PlatformObject] | ||
| Graphic | Graphic | ||
| Line 50: | Line 51: | ||
| We also need the Repeat property, so that the texture will repeat within the object: | We also need the Repeat property, so that the texture will repeat within the object: | ||
| - | < | + | < |
| [PlatformObject] | [PlatformObject] | ||
| Graphic | Graphic | ||
| Line 68: | Line 69: | ||
| Let's move the platform to the bottom of the screen and extend it to the whole screen width: | Let's move the platform to the bottom of the screen and extend it to the whole screen width: | ||
| - | < | + | < |
| [PlatformObject] | [PlatformObject] | ||
| Graphic | Graphic | ||
| Line 78: | Line 79: | ||
| We can use this as a template to create many platforms. But rather than create a few platforms in code, it would be much easier to create a single empty parent object with a few child objects under it. | We can use this as a template to create many platforms. But rather than create a few platforms in code, it would be much easier to create a single empty parent object with a few child objects under it. | ||
| - | Start by making | + | Start by re-using |
| - | < | + | < |
| [Scene] | [Scene] | ||
| ChildList = PlatformObject # MiddlePlatformObject # TopLeftPlatformObject # | ChildList = PlatformObject # MiddlePlatformObject # TopLeftPlatformObject # | ||
| Line 113: | Line 114: | ||
| Next change the code in the Init() function to create " | Next change the code in the Init() function to create " | ||
| - | < | + | < |
| + | orxObject_CreateFromConfig(" | ||
| orxObject_CreateFromConfig(" | orxObject_CreateFromConfig(" | ||
| </ | </ | ||