User Tools

Site Tools


en:guides:beginners:running_and_standing

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:guides:beginners:running_and_standing [2020/08/19 12:17 (5 years ago)] – Removed obsolete paragraph iarwainen:guides:beginners:running_and_standing [2024/11/18 04:18 (4 months ago)] (current) – Highlights sausage
Line 5: Line 5:
 He needs to be able to stand still when not running. To do this, we need to add an idle animation. He needs to be able to stand still when not running. To do this, we need to add an idle animation.
  
-An idle animation would be simply playing hero frame 1 from the spritesheet over and over. Let's create a ''HeroIdle'' animation  in the HeroAnimationSet and set it as the starting animation:+An idle animation would be simply playing hero frame 1 from the spritesheet over and over. Let's create a ''HeroIdle'' animation  in the ''HeroAnimationSet'' and set it as the starting animation:
  
-<code=ini>+<code=ini [highlight_lines_extra="4,5,6"]>
 [HeroAnimationSet] [HeroAnimationSet]
 Texture = soldier_full.png Texture = soldier_full.png
Line 32: Line 32:
 Add all the possible links to ''HeroAnimationSet'': Add all the possible links to ''HeroAnimationSet'':
  
-<code=ini>+<code=ini [highlight_lines_extra="5,7,8"]>
 [HeroAnimationSet] [HeroAnimationSet]
 Texture = soldier_full.png Texture = soldier_full.png
Line 54: Line 54:
 When the right key is pressed, the run animation,''HeroRun'', needs to play by setting it as the target animation. And when right is released, the target is set to ''HeroIdle'', and the graph must calculate it's way back to "Idle" as the animation to play: When the right key is pressed, the run animation,''HeroRun'', needs to play by setting it as the target animation. And when right is released, the target is set to ''HeroIdle'', and the graph must calculate it's way back to "Idle" as the animation to play:
  
-<code=cpp>+<code=cpp [highlight_lines_extra="3,4,5,6"]>
 if (orxInput_IsActive("GoRight")) if (orxInput_IsActive("GoRight"))
 { {
Line 84: Line 84:
 That takes care of running and stopping while facing right. But what about left? That takes care of running and stopping while facing right. But what about left?
  
-Let try that now.+Let'try that now.
  
 ---- ----
en/guides/beginners/running_and_standing.1597864674.txt.gz · Last modified: 2020/08/19 12:17 (5 years ago) by iarwain