I cant handle with one simple condition

Get help using Construct 2

Post » Tue Jan 13, 2015 1:39 pm

I prepare this same example with wrong events. Please fix this if you can
You do not have the required permissions to view the files attached to this post.
B
109
S
26
G
46
Posts: 1,886
Reputation: 35,168

Post » Tue Jan 13, 2015 1:42 pm

@delgado Sorry I can't open your capx, I'm running R190 and I'm halfway through a project so I won't be upgrading to a beta version.

I'm sure someone will be able to point you in the right direction though.
B
10
S
2
G
1
Posts: 42
Reputation: 798

Post » Wed Jan 14, 2015 2:20 am

I also add variable still dont works
You do not have the required permissions to view the files attached to this post.
B
109
S
26
G
46
Posts: 1,886
Reputation: 35,168

Post » Wed Jan 14, 2015 2:57 am

Refeuh wrote:I think you're misunderstanding how conditions work
https://www.scirra.com/manual/75/how-events-work


Do this. And the section on 'picking'. It's essential.

edit: if you can write some pseudocode, it might help
e.g. IF this OR this THEN do this ELSE do something
Last edited by codah on Wed Jan 14, 2015 3:01 am, edited 1 time in total.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Wed Jan 14, 2015 3:00 am

You keep ANDing everything. I'm guessing you want to OR the animation check, that is, i2 OR i31. In your sample condition.capx, select event 10 (near the left edge of event 10, not on either condition), right click, and choose 'Make OR block'.
ImageImageImage
B
71
S
21
G
232
Posts: 3,695
Reputation: 129,866

Post » Wed Jan 14, 2015 6:08 am

@blackhornet Make or block cant be because SLOT animations: i2 & i31 MUST be played at the same time and after when 'mark' overlapping at the same time SLOTs >>>spawn object
B
109
S
26
G
46
Posts: 1,886
Reputation: 35,168

Post » Wed Jan 14, 2015 7:35 am

I prepare short movie what is going wrong
https://www.youtube.com/watch?v=XjXX8gZ ... e=youtu.be
B
109
S
26
G
46
Posts: 1,886
Reputation: 35,168

Post » Wed Jan 14, 2015 7:57 am

i2 & i31 MUST be played at the same time


They cannot be played at the same time on the SAME entity, which is what your conditions are checking ; you're asking the system to pick entities that play both i2 AND i31, which is none, not entities that play i2 and entities that play i31 as separate sets.

Check the link on the previous page about events, conditions and picking.

(I can't open .capx either, 'still on r190)
Image
Game Producer & Independent Developer - http://raphaelgervaise.com
B
23
S
9
Posts: 237
Reputation: 2,207

Post » Wed Jan 14, 2015 7:58 am

Animations are made up of images. A sprite can only show one image at a time. An animation only shows one image at a time. This implies that only one animation can be playing at any one time.

If you want something like this

sprite1 animation1 is playing AND sprite1 animation2 is playing THEN do SOMETHING

SOMETHING is never going to happen, because a sprite can only ever show one image at a time.

At least that's my understanding.
B
10
S
2
G
1
Posts: 42
Reputation: 798

Post » Wed Jan 14, 2015 8:08 am

@nickl
"sprite1 animation1 is playing AND sprite1 animation2 is playing THEN do SOMETHING"
exacly in words this sounds like that.
I know this never will works, now i need some wise man to make code because i, thats why im asking for help
Needs an alternative solution with use


"SOMETHING is never going to happen, because a sprite can only ever show one image at a time."
in game i have 18 same sprites called 'Slot' so this slots have same animations, when i want, one slot show other animation.

Now i clearly express myself?

Sorry for my englis i use translator
B
109
S
26
G
46
Posts: 1,886
Reputation: 35,168

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: ChoosyZerk and 72 guests