How do I Recognise All Objects That Can "Catch Fire"

Get help using Construct 2

Post » Tue May 02, 2017 10:32 am

ERm, I think I fixed it? I sped everything up by a lot because it takes soooooooooo long to test so I don't know if that's affected anything at all but....

Event 17 in your cut-down example, I changed "For each AppleTree" to "For each FireCloak" - since you are wanting to check each firecloak and find the corresponding TREE that goes with the cloak ID. The way you had it, you were basically telling it if the tree.ID is equal to itself, then do stuff. Now, by changing the loop object to the cloak, it's using that as the comparison.

Hopefully that has actually done it. Go ahead and change event 17 loop object from tree to cloak and see if it works for you too :)

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
81
S
34
G
40
Posts: 3,032
Reputation: 30,424

Post » Tue May 02, 2017 11:20 am

Hey Sol,

Thanks so much for spending the time you have to look into this for me! I have tested it twice and it's consistent. Thank you so much!

Just one question though, does that mean I need the part where I check the AppleTree's Object_UID to see if it matchs the FireCloak's Object_UID or not? Because you said that was just picking itself, even though in the expression, it says "FireCloak.Object_UID"?
B
11
S
3
G
2
Posts: 36
Reputation: 1,811

Post » Wed May 03, 2017 1:55 am

Yes you need the part where it checks the tree ID against the loop "for each cloak". It was comparing to itself before because (from memory) your loop was "for each tree" then you were comparing "tree.id=cloak.id".... but, which cloak ID? By changing the loop to "for each cloak" you're telling it which cloak to compare to. Before it was just comparing to *any* cloak, not a specific cloak. :)

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
81
S
34
G
40
Posts: 3,032
Reputation: 30,424

Post » Wed May 03, 2017 1:59 am

Oh I understand perfectly now.

Thanks for your help! Very grateful!
B
11
S
3
G
2
Posts: 36
Reputation: 1,811

Previous

Return to How do I....?

Who is online

Users browsing this forum: Syazanie Amirin and 7 guests