I cant handle with one simple condition

Get help using Construct 2

Post » Wed Jan 14, 2015 9:53 am

@Ashley
C2 needs expressions to make that such events and conditions will work
or i dont know how use C2
or i can not describe my problem clearly in english and i cant explain what you guys should need to know about my problem
Can you tke look at this issue?
B
109
S
26
G
46
Posts: 1,886
Reputation: 35,168

Post » Wed Jan 14, 2015 10:48 am

You can't possibly expect Ashley to respond to this, it is just your misunderstanding about C2.

Anyway, after looking at your video I think I might understand what you're trying to do. Have a look at the capx and see if it's 'close' to what you're after. It's not the only solution and probably not the best.
overlapping_codah.capx


My understanding is this:
You have 1 sprite type 'x', with (at least) 2 animations
You want to create a 3rd sprite 'z', based on these conditions:
1. User selects sprite instance 'x1' and a marker is placed on it to indicate selection.
2. User then selects sprite instance 'x2' and a marker is also placed on it to indicate selection.
IF sprite 'x1' is playing animation 'y1' AND sprite 'x2' is playing animation 'y2' THEN create sprite 'Z'

You can substitute 'y1' as'sticks', 'y2' as 'flints' and 'z' as fireplace
You do not have the required permissions to view the files attached to this post.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Wed Jan 14, 2015 11:06 am

@codah Example is closest what i need!
But is one thing.
When i add to your sprite new animation a3, i test project and when mark is overlapping for example a2 & a3, object was created even if condition is a1 and a2

PS i never use pick count on my games im amateur in this
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 11:22 am

I don't have r194 just yet so I didn't open the file.

Try this modification. We have to keep checking for overlapping the marker after 'resetting' the picking by 'pick all'.
overlapping_codah.capx


edit: I've also made some other 'enhancements'. You can now remove the marker, and re-create it, thus creating more of sprite 'z'
You do not have the required permissions to view the files attached to this post.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Wed Jan 14, 2015 12:42 pm

@codah hurray! its working finally :) i make few tests and working fine!
Codah if i want make this but for three animations i just must change Slot.PickedCount2 to Slot.PickedCount3 right? and copy subevent condition of course
B
109
S
26
G
46
Posts: 1,886
Reputation: 35,168

Post » Wed Jan 14, 2015 1:30 pm

delgado wrote:@codah hurray! its working finally :) i make few tests and working fine!
Codah if i want make this but for three animations i just must change Slot.PickedCount2 to Slot.PickedCount3 right? and copy subevent condition of course


hmm if you want the user to select 3 objects to make the final object, then yes.

To be honest I would probably introduce a variable or two, as needed, and not try and do everything in one big event/subevent group. But if it's working, good. (I removed the Sprite.PickedCount=1 check in my last version because they are probably unnecessary if you cannot have more than 1 of the same object type in different slots).
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Wed Jan 14, 2015 4:55 pm

@codah can i have one more question?
B
109
S
26
G
46
Posts: 1,886
Reputation: 35,168

Post » Wed Jan 14, 2015 9:23 pm

Of course, go for it
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Thu Jan 15, 2015 2:42 am

@codah I try mke 2 similiar group of events first is with use 2 slots and second is with use 4 slots. This second with 4 slots cant work if first group of events is enabled but when i toggle disable, 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 » Thu Jan 15, 2015 3:15 am

delgado wrote:@codah I try mke 2 similiar group of events first is with use 2 slots and second is with use 4 slots. This second with 4 slots cant work if first group of events is enabled but when i toggle disable, works.


That's getting too complicated. Try this
You do not have the required permissions to view the files attached to this post.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Previous

Return to How do I....?

Who is online

Users browsing this forum: Lancifer, Yahoo [Bot] and 58 guests