Transformation/Awakening state

0 favourites
  • 9 posts
From the Asset Store
State Machine
$10.99 USD
State Machine is a great tool for managing the state of anything in your game.
  • Hello everyone! I'm making a platform game and I want to make some kind of "awakening state" of the main character. But I have a little bit problem with that. How can I do that in easiest way if my player has a lot of animations and large event sheet? I thought that I can use expression "replace" to change all default animations to awakening animations for an appointed time. But I don't know exactly how to do that. Maybe there is an easier way?

    Thank you in advance for the help .

  • awakening means all movements are disabled until player come near to it ?? am i right

    if yes then here is example

  • I can't open this because I have version 2.2.1

    But I think this is not what I really mean. Awakening will be a character appearance transformation and rise of his power. And I don't know how to replace idle, walk, attack etc. animations to change player's look when he is in awakening state.

    PS. Sorry if I made miskates in English.

  • Alexiss169

    you could add an instance variable called "State" to your player and use that as a prefix (or suffix) for the animation names...

    so you would have "idleNormal", "walkNormal", "attackNormal", etc...

    or "idleAwakening", "walkAwakening", "attackAwakening", etc...

    then any time you change the animation, just include the state variable:

    Set Player animation to "idle" & Player.State

    (obviously you would set State = "Normal" at the start, and then = "Awakening" as needed - you could have any number of other stages).

  • Maybe use an instance variable on player so lets say:

    playerState: x

    where x can be replaced by 0 or 1 and where 0= normal and 1=awakening

    so now you can create a set of controls for awakening mode and normal mode and depending the playerState, you can set different animations and turn off the normal state group.

    Lol, AllanR just explained better than me, but that,s how it should work. did something similar for a small prototype in which I needed different sets of animations for two states.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • AllanR best explanation I've seen so far I myself should make it a habit of using this for my game updates. It will make things much easier.

  • It worked !

  • Hey guys! I don't want to create a new topic so I'm gonna ask here. How to make player acting specially when he is on the edge of the platform? Something like this: media.exophase.net/images/2008/09/sonichd-4.jpg

  • Alexiss169 you could try placing a collider box (hidden) on your edges and do something like : on player collision with (collider) if player animation = idle ; wait 1 sec. , set player animation = "ToooCloseToEdge"... or something along those lines

    if your platforms are sprites you could do something similar by placing points on the edges and checking with those. ... just a thought there may be many more ways to do this.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)