Implement "on Mouse over" and "on Mouse out"

Discussion and feedback on Construct 2

Post » Wed Dec 24, 2014 2:30 pm

'On collision' and 'Is overlapping/Trigger once' don't work the same way. If Sprite1 collides with 5 instances of Sprite2 then the 'on collision' event will trigger 5 times with a different Sprite2 picked each time. The 'Is overlapping/Trigger once' event would only fire once with all 5 Sprite2 objects picked.
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,670

Post » Wed Dec 24, 2014 6:25 pm

Aphrodite wrote:
eli0s wrote:they just happen (and can happen outside of the every tick logic, like you press a button, it should fire even if you are not currently reading the event sheet.)


I doubt that they "just happen". There is obviously work being done behind the scenes. I suspect there isn't much difference- triggers must be checked in some form every tick, otherwise how else would they know to fire when they're suppose to. Where do you get your information from?
B
47
S
22
G
65
Posts: 1,127
Reputation: 38,395

Post » Wed Dec 24, 2014 6:29 pm

@Prominent

"However, triggers are an exception. See the green arrow to the left of Keyboard: On Space pressed from the previous example:

Note the trigger.
This indicates the event is triggered. Rather than running once per tick, this event simply runs (or "fires") upon something actually happening. In this case, the event runs when the user hits the Spacebar key on the keyboard. It is never checked any other time. Since triggers run upon an event happening, they aren't checked in top-to-bottom order like other events. This means the ordering of triggers relative to other events is not important (except relative to other triggers of the same type, since triggers still fire top-to-bottom)."

https://www.scirra.com/manual/75/how-events-work

and yes, there may be work behind the scene to make sure the trigger actually occurs, but in their essence, they rely on something happening rather than on state checking.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 11 guests