OR-block ignores instances picked in parent event

0 favourites
From the Asset Store
Very simple code without excess options (15 events for server and 11 events for client)
  • Maybe this thread refers to the same error.

    I'm not sure.

    Yup... At first glance it seems to be the same error, in a MUCH simpler way than what I tried to painstakingly describe ^^

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Cassianno

    I really tried to make an example as simple as possible to understand but I'm not sure I succeeded:

    Here's how it breaks down

    If click on Character then Pick only this Character

    Character (UID = 1) and Character (UID = 2) (Same object)

    One Character is on top of Zone A, and second Character is on top of Zone B

    EVENT:

    Pick selected Character only (After click on Character)              < C2 IGNORES THIS
    	
    	If Character is over Zone A
    	OR
    	if Character is over Zone B
    	
    		If Character is 8-Directions Moving
    		OR
    		If Character is Pathfinding Moving on Path
    			
    			Hide Blue Square
    
    		If Character is NOT 8-Directions Moving
    		OR
    		If Character is NOT Pathfinding Moving on Path
    
    			Show Blue Square[/code:1232xrn1]
    			
    So the fact that there are OR blocks in the middle of the event in sub-events, C2 ignores the "Pick only this instance of the object" instead it picks all objects so the behavior doesn't work as intended. The blue square should react only to the selected Character where here it's also affected by the 2nd one who's not selected. You pick a character, you move it over a zone, this should hide the blue square and show it only when character stops moving over the zone. But blue square is still displayed because the 2nd character which SHOULDN'T be picked is over a zone and not moving.
    

    I actually downloaded your capx at zipfile and tested. Worked as you said it's supposed to. Ive put both characters on a zone and while moving one, the blue square wasn't displayed.

  • Cassianno I'm sorry I didn't understand properly. Do you mean you confirm it's not working as intended? Or that you had no problem with it and the square was hiding when a character is moving and displaying when not moving. If it's the latter, did you try to move both characters? I think only one of them who has the highest UID causes the issue.

  • Cassianno I'm sorry I didn't understand properly. Do you mean you confirm it's not working as intended? Or that you had no problem with it and the square was hiding when a character is moving and displaying when not moving. If it's the latter, did you try to move both characters? I think only one of them who has the highest UID causes the issue.

    Yeah, the way i tested it worked as supposed ("no bug"). I don't remember if i tried with both characters tho, maybe i tried only with the lowest UID one.

    Anyway, the other thread linked before indeed proves that there's a bug.

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