<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:#000000"><span style="font-family:Arial,Helvetica,sans-serif;color:rgb(34,34,34)">On Mon, 3 Sep 2018 at 17:39, Jeremy Landry <<a href="mailto:hakyoku@gmail.com">hakyoku@gmail.com</a>> wrote:</span><br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr">This question pertains to Etoys 5.  <div><br></div><div>I'm trying to set up communication between two objects using event triggers, but cannot seem to understand what I'm doing wrong.</div><div><br></div><div>Here is the project:</div><div><a href="https://drive.google.com/open?id=1hQ9VqRkQu4VeH75dxV0inwL4HXGMDZFg" target="_blank">https://drive.google.com/open?id=1hQ9VqRkQu4VeH75dxV0inwL4HXGMDZFg</a><br></div><div><br></div><div>Here is the description of desired effect:</div><div>The playfield tells all Enemy objects (just one in this case) to 'bounceAround'. Then following that, tells all BGTile objects to 'beSolid'. If the Enemy object overlaps any BGTile object with it's variable of 'isSolid' set to True, that BGTile object triggers an event the Enemy object responds to.  The problem is that the trigger isn't seen by the Enemy object as having come from BGTile but from the entire playfield!</div><div><br></div><div>I set up a variable within Enemy to figure out why setting Enemy's Bottom to Enemy's Triggering Object's Top would send the Enemy completely off the screen. </div><div><br></div><div>Is this because the originating script that is ticking is the Playfield's script?  If so, how should I set this up to create a situation where sibling objects can find specifically which ones actually collided if the Triggering Object will always be the originating ticking script?</div><div><br></div><div>Thanks for any help and I hope this makes sense.  I left the offending scripts open along with the Enemy viewer flap so that the triggering object variable is seen.</div></div></div></blockquote><div><br></div><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">This kind of general object-object interaction is hard in Etoys.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">We generally try to design around it. For example, in Pac-Man, the obvious approach would be to move the player, check if it collided with a dot, then delete that dot. This doesn't work because it is not easy to check which dot it collided with. Instead, we have all the dots ticking to check if they collided with the player, and if so delete themselves and increase the global score.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">Maybe you can design your game in a similar way?</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">- Bert -</div><br></div><div> </div></div></div>