How do I make objects orbit around the same point?

Get help using Construct 2

Post » Wed Jun 01, 2016 9:21 pm

I was in the process of making an enemy when I had an idea for an interesting attack for it to perform, but I have no idea how to make it work. The idea for the attack is that the enemy would spawn a circle of fire around itself, make it rotate and speed up, then launch it at the player. I've been able to make the enemy spawn the fire and could make the fire move towards the player, but I can't figure out how to make it orbit. I've tried the solutions presented in this thread here:
make-an-object-orbit-around-another_t55723
but I'd like to have multiple objects orbit the same point, and be able to make it accelerate. So far, I've had the enemy spawn an invisible sprite, which then spawns the 8 fire sprites from 8 imagepoints around it. As suggested in the above thread, I've considered using a long sprite and setting the fire sprite to the long sprite's imagepoint, but the problem arises when I want multiple instances of the same sprite to be able to set themselves to separate points. I can't think of a way to do this with instance variables, since I don't know if there's a way to set an instance variable to a specific number. One idea I've had is to just have 8 separate identical sprites for this, but what if I want to have multiple of this enemy present? The best idea I've had is to have them have an instance variable that's linked somehow to the number of that specific sprite on the map. Either way, thanks for reading and you can download what I've got so far here:
drive.google.com/uc?export=download&id=0BwLbdaJdyjbUSHQzcjIxcUU3RzQ

^Sorry about cutting the URL, these forums don't allow people with low rep (the people who need to post urls) to post actual urls.
B
3
Posts: 4
Reputation: 177

Post » Wed Jun 01, 2016 10:14 pm


  • System > On start of layout | system > load game from slot "brain"
  • System > On load failed | system > scroll to obj_Forum
B
17
S
8
G
5
Posts: 340
Reputation: 4,707


Return to How do I....?

Who is online

Users browsing this forum: jorgmaquoi, marc254, tarek2, Yahoo [Bot] and 28 guests