Same actions/events for multiple objects?

Get help using Construct 2

Post » Thu Apr 12, 2012 3:31 pm

Hi, I'm starting an asteroids type game for something to do and I'm wondering if it's possible to have one set of actions and events applied to multiple objects?

As you know Asteroids has several asteroids on the screen all spinning and moving at various angles. When they go off the edge of the screen they re-appear at the other edge. What I wanted to do was create an event to check if it went off the edge and an action to move it to the other side but I don't really want to have to do this for every possible asteroid on the screen.

So I'm wondering if and how I can set up one lot of events for them all?

Cheers.
B
19
S
5
G
4
Posts: 208
Reputation: 3,960

Post » Thu Apr 12, 2012 3:39 pm

@vandinz you dont need to create a event for achieve this effect.
You can use the Wrap behavior, and the engine will do this automatically.. ;)

http://www.scirra.com/manual/105/wrap
B
5
Posts: 4
Reputation: 441

Post » Thu Apr 12, 2012 3:49 pm

MY FRIEND IF YOU CAN USE THIS FOR VARIABLES EZECURTAR A GROUP OF EVENTS I'M DOING THIS TYPE IN A GAME THAT USING AOES TO SEVERAL OBJECTS, THEN I'M USING VARIABLES

EX:

ACTION: IF THE LAYOUT Sprit Outsid
CONDITION: SET VARIABLE (X) IN 1

ACTION: IF THE VALUE OF VARIABLE (X) FOR "1"
CONDITION: The Asteroids CHANGE OF POSITION OR CHANGE YOUR VALUE RONDOM.

IF THE VALUE OF VARIABLE (X) IS "0" The Asteroids BACK THE VALUES OF ORIGIN.

TRANSLATED BY GOOGLE TRATUTOR DECULPE ERRORS HOPE UNDERSTAND!
ramosalvaro
STUDIOSURICATE.COM.BR
B
24
S
3
G
2
Posts: 10
Reputation: 4,610


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests