Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
My events are:
[ul] [li]If Frog is overlapping portal AND IsInPortal = 0 (touching a portal for the first time)[/li]
[/ul] IsInPortal = 1
For each portal Alert portal.Type
[li]If Frog is overlapping portal at offset(-Frog.Height, 0) IsInPortal = 0 (finished operlapping)[/li]
I would have expected the loop to occur only once, at the entry. However, it happens on entry, and when it fully overlaps, it runs the loop each frame until it exists the portal... so I thought if the pivot of the frog is 0,0 then that would explain it, since it does overlap a lot. but the pivot is in the middle of the frog (16, 16)
What am I missing?
What is happening and what did you expect to be happening?
the way these events are now is that the system will check every tick if the collision-polygon of the frog is overlapping the collision-polygon of the portal and if the collision-polygon of the frog is overlapping the collision-polygon of the portal at offset..
LittleStain yeah, but since the loop is a sub event, so if IsInPortal is 1, it shouldn't have looped again, until the frog exited the portal...
I've shortened my code above to a more logic way, still occurs...
Develop games in your browser. Powerful, performant & highly capable.
Well, I'm ashamed of myself... I just found out there's an "invert" command on events... It sure looked strange there isn't any "NOT" condition...
Thanks LittleStain for the help