Transformation/Awakening state

Get help using Construct 2

Post » Thu Jun 30, 2016 11:23 am

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 :).
B
4
Posts: 15
Reputation: 230

Post » Thu Jun 30, 2016 12:11 pm

awakening means all movements are disabled until player come near to it ?? am i right
if yes then here is example
Image
B
64
S
39
G
42
Posts: 630
Reputation: 30,553

Post » Thu Jun 30, 2016 12:37 pm

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.
B
4
Posts: 15
Reputation: 230

Post » Thu Jun 30, 2016 3:13 pm

@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).
Last edited by AllanR on Thu Jun 30, 2016 3:14 pm, edited 1 time in total.
B
94
S
33
G
20
Posts: 438
Reputation: 17,615

Post » Thu Jun 30, 2016 3:14 pm

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.
B
43
S
12
G
14
Posts: 488
Reputation: 10,570

Post » Thu Jun 30, 2016 3:48 pm

@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.
Freefall Bird
B
47
S
9
G
5
Posts: 280
Reputation: 5,781

Post » Thu Jun 30, 2016 9:52 pm

It worked :D . Thank you all :D !
B
4
Posts: 15
Reputation: 230

Post » Fri Jul 01, 2016 3:13 pm

Message: Alexiss169 can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
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: http://media.exophase.net/images/2008/09/sonichd-4.jpg
B
4
Posts: 15
Reputation: 230

Post » Fri Jul 01, 2016 4:12 pm

@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.
Freefall Bird
B
47
S
9
G
5
Posts: 280
Reputation: 5,781


Return to How do I....?

Who is online

Users browsing this forum: el3um4s and 7 guests