Idle facing right and Idle facing left

Get help using Construct 2

Post » Wed Aug 06, 2014 3:25 pm

I want to use 2 idles but i dont use mirroring or flip becuase the character is having a sword on the rigth hand so i made two idles , one when is finishing running left and one after running front.

So I do as a tutorial and use on plataform stopped , but is using the front idle and when i run left it uses same front idle so how do i resolve that for the character when runing left will use idle 2 whne ifnishing running ect?

I appreciatte any help
B
4
Posts: 21
Reputation: 226

Post » Wed Aug 06, 2014 5:49 pm

You could simply give the character a variable storing which direction they are facing. Then when setting the idle animation, check the variable.
B
40
S
12
G
11
Posts: 331
Reputation: 7,752

Post » Wed Aug 06, 2014 6:49 pm

This is made graphically without me coding ? thi sis supposed to be design for almost no use code . simple using event sheet im looking to do it
B
4
Posts: 21
Reputation: 226

Post » Wed Aug 06, 2014 6:58 pm

You could do as following:

Make a second sprite for the hero, name it "HeroIDLE" or something, give it the 2 IDLE sprites as animation, right on frame 0 and left on frame 1 with 0 Speed so the sprite won't play an animation, make it invisible and make an event as folloing:

"HeroIDLE" set position
X: Hero.X
Y: Hero.Y

Tis way the idle hero will always be at the same possition as the hero sprite

Now the magic trick: When you need the hero to become IDLE toggle it visibility to "Invisible" and HeroIDLE visibility to "True" and set HeroIDLE on frame o or fram 1 depending on wich direction the "Hero" was facin before turning invisible!!

Hope youu understand me =)
B
4
Posts: 6
Reputation: 207

Post » Wed Aug 06, 2014 8:09 pm

InfiniteRender wrote:This is made graphically without me coding ? thi sis supposed to be design for almost no use code . simple using event sheet im looking to do it


From your question, I assume you have not gone through all the beginner tutorials. Instance variables do not require any code. On the right side of the screen, locate the objects menu. Right click on the object and select instance variables. From the menu that pops up, you can create an instance variable. Then, in your conditions that define which animation to play, add a condition that checks the value of the instance variable.

To get more information about instance variables look here:
https://www.scirra.com/manual/73/instance-variables
https://www.scirra.com/tutorials/37/beg ... onstruct-2

The section of the beginners tutorial that goes over instance variables is page 6 linked below
https://www.scirra.com/tutorials/37/beg ... t-2/page-6
B
40
S
12
G
11
Posts: 331
Reputation: 7,752

Post » Wed Aug 06, 2014 10:27 pm

Thank you Frag and im trying in some minutes the thing told me both of you will check it out and tell you.
B
4
Posts: 21
Reputation: 226

Post » Thu Aug 07, 2014 1:16 pm

I erased this sorry
Last edited by InfiniteRender on Thu Aug 07, 2014 1:50 pm, edited 1 time in total.
B
4
Posts: 21
Reputation: 226

Post » Thu Aug 07, 2014 1:27 pm

I erased this sorry
Last edited by InfiniteRender on Thu Aug 07, 2014 1:51 pm, edited 1 time in total.
B
4
Posts: 21
Reputation: 226

Post » Thu Aug 07, 2014 1:50 pm

What im thinking what i have to do is....

1) If i untouch left arrow wich has animation run backwards ,then animation idle2 beggins
2) If i untouch rigth arrow wich has animation run foward , then animaiton idle1 Beggins

This is the logic im thinking but im trying to put in the event sheet can some one help me? i know this in my mynd works but in the event?
B
4
Posts: 21
Reputation: 226

Post » Thu Aug 07, 2014 2:26 pm

I did as i thought but is not working , some one can help me get trough this?
You do not have the required permissions to view the files attached to this post.
B
4
Posts: 21
Reputation: 226

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 24 guests