Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sequence_instance_override_object not working properly #9074

Open
gm-bug-reporter bot opened this issue Jan 19, 2025 · 0 comments
Open

sequence_instance_override_object not working properly #9074

gm-bug-reporter bot opened this issue Jan 19, 2025 · 0 comments
Labels
project This issue has a sample project attached runner-bug In-game bugs with the "GameMaker Studio 2" runtimes

Comments

@gm-bug-reporter
Copy link

Description

Not sure what to make of this bug.
I have this object called oEnemy_Bee that I put in the room. In its create event it creates an instance of oDamage_enemy and a sequence. I try to override the objects in the sequence with the instance I created and the oEnemy_Bee itself.

So weird thing, when I tried to override the attack first and the bee second, I get an error that the sequence has no layer. In this situation I believe there is a second instance of oEnemy_Bee being created by the sequence, which has no assigned layer.
But if I change the order of the lines and override the Bee object first and the attack object second, it works. Don't know what's going on here but I'm scared.

Steps To Reproduce

attack1_damage = instance_create_layer(x, y, layer, oDamage_enemy);
attack1_seq = layer_sequence_create(layer, x, y, seqEnemy_Bee_attack1);
attack1_seqinst = layer_sequence_get_instance(attack1_seq);
sequence_instance_override_object(attack1_seqinst, oDamage_enemy, attack1_damage);
sequence_instance_override_object(attack1_seqinst, oEnemy_Bee, id);```
This throws an error ^

attack1_damage = instance_create_layer(x, y, layer, oDamage_enemy);
attack1_seq = layer_sequence_create(layer, x, y, seqEnemy_Bee_attack1);
attack1_seqinst = layer_sequence_get_instance(attack1_seq);
sequence_instance_override_object(attack1_seqinst, oEnemy_Bee, id)
sequence_instance_override_object(attack1_seqinst, oDamage_enemy, attack1_damage);;```
this doesn't throw an error ^

Which version of GameMaker are you reporting this issue for?

IDE v2024.11.0.179 Runtime v2024.11.0.226

Which operating system(s) are you seeing the problem on?

Windows 10.0.22631.0

Which platform(s) are you seeing the problem on?

Windows

325ea0d1-5f29-43a2-8cfe-9362439cf25f

@gm-bug-reporter gm-bug-reporter bot added project This issue has a sample project attached runner-bug In-game bugs with the "GameMaker Studio 2" runtimes labels Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
project This issue has a sample project attached runner-bug In-game bugs with the "GameMaker Studio 2" runtimes
Projects
Status: Triage
Development

No branches or pull requests

0 participants