View Issue Details

IDProjectCategoryView StatusLast Update
0031470RunnerFunctionsPublic2019-11-28 14:10
ReporterScott DunbarAssigned ToFritz 
PriorityMediumSeverityC - GeneralReproducibility100%
Status ClosedResolutionNo Change Required 
Product Version2.2.4 
Target VersionFixed in Version 
Summary0031470: Functions: instance_deactivate_object targeting a parent object does not behave as expected
DescriptionIssue:
 calling the functions instance_activate_object and instance_deactivate_object on a parent object from a single step event will cause the child object to show on every other frame.


In the attached project a control object on every step event does the following

instance_activate_object(parentBlock)
instance_deactivate_object(parentBlock)

instance_activate_object(oBall)
instance_deactivate_object(oBall)

oBall is correctly not shown every frame
but the parentBlock is shown on every other frame
Steps To Reproduce1. import attached project
2. run attached project
3. observe that the box is shown every other frame
Additional Informationattached project has been set to 1 fps
TagsNo tags attached.
1.4 Found In
2.x Runtime Found In2.2.4.372
2.x Runtime Verified In

Activities

Scott Dunbar

2019-10-29 10:33

Adminstrator  

parent_activation_flicker_test.yyz (26,265 bytes)

Fritz

2019-11-26 12:18

Manager   ~0065163

the problem is arising due to the call to using parentBlock - on frame 1 this is evaluated to be the Ball instance, on frame 2 it's evaluated to be the Block instance and so on. If you change the code to

with(parentBlock)
{
    instance_activate_object(id)
    instance_deactivate_object(id)
}
the behaviour is as the dev is expecting. Evaluating parentBall will change due to the activation\deactivation of the instances, it's not guaranteed to be always the Block instance

Dan

2019-11-28 14:10

Adminstrator   ~0065180

Closing as per the above comment.