GMLscripts.com

Discuss and collaborate on GML scripts
Invert

You are not logged in.

#1 2009-06-22 20:43:36

flexaplex
Member
Registered: 2008-12-11
Posts: 72

outside view event - instances with a sprite do not execute the event

Brief Description:            outside view event - this event never executes for instances that have a sprite (though it does with instances that do).
GM Versions:                   GM7
References:                     [1] [2] [3] [4] [5]
Example File:                   outside_view_bug.gmk
Bug Confirmed:                Yes
Hardware Dependent:     No

Main Info:

The outside view event is pretty much unusable due to this bug. It just doesn't get executed at all for instances that are given a sprite, although it strangely does for instances that aren't.

Workaround:

You can check in the step event yourself if the instance is outside the view using this script:

//outside_view[0..7]

if (bbox_right < view_xview[argument0]) {return true;}
if (bbox_top < view_yview[argument0]) {return true;}
if (bbox_left > view_xview[argument0]+view_wview[argument0]) {return true;}
if (bbox_bottom > view_yview[argument0]+view_hview[argument0]) {return true;}
return false;

Last edited by flexaplex (2009-06-22 20:52:52)

Offline

Board footer

Powered by FluxBB