SOLVED Need help suggestions.

River

Member
Hello everyone, I'm making a Boss monster (like in the clip below), it's this boss that can create turrets with linked lines. The question I would like everyone to help me with is: how do I make these strings to attach to these turrets, (these turrets I know will be generated at random) but I don't know how to generate the threads wire links these turrets as shown in the clip. Hope anyone can help me out, I know this is a dumb and stupid question but hope someone can help. Sincerely thank. I am using GMS 1.4
Video
 

TailBit

Member
I would give the boss a list and when it create a new enemy, then add it to the list and set a variable in the enemy instance to the id of the boss.

GML:
var ins = instance_create(...);
ds_list_add(minion_list,ins);
ins.owner = id;
When enemy is destroyed, then check if it have an owner, if so and owner exists, then remove it from the list in owner.

In the draw event of the boss, just draw lines between it and all instances in the list using a loop.
 

River

Member
I would give the boss a list and when it create a new enemy, then add it to the list and set a variable in the enemy instance to the id of the boss.

GML:
var ins = instance_create(...);
ds_list_add(minion_list,ins);
ins.owner = id;
When enemy is destroyed, then check if it have an owner, if so and owner exists, then remove it from the list in owner.

In the draw event of the boss, just draw lines between it and all instances in the list using a loop.
Yah, thank you for your help, I will try it.
 
Top