How to give this actions?

Get help using Construct 2

Post » Thu Jul 25, 2013 10:15 am

I have an object called void that currently sucks other objects. Now when a button is pressed, The void must push the other objects when the objects come close to it. In other words the void must repel the other objects when pressing a button to the outside screen.

Then when pressing another button, I want the void to suck objects faster and further than what it currently does. How do I do this?
B
4
Posts: 11
Reputation: 247

Post » Thu Jul 25, 2013 10:29 am

That's simple:
-if button pushed reverse.
-if other button pushed increase suck.

I don't know the events you use to make the void suck, so I can't give you any details. for now you will have to do with this simple explanation.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Jul 25, 2013 4:41 pm

Ok i couldn't find the actions so here's the file. it will work on either of the links.

http://www.2shared.com/file/FzTFm1vs/Space_Munch.html

http://www.mediafire.com/download/bijjcdbqodi6xnc/Space_Munch.capx

B
4
Posts: 11
Reputation: 247

Post » Thu Jul 25, 2013 5:12 pm

The actions I said aren't actions.
Like I said in my post it's only possible to reverse the sucking if you know how the sucking is done.
The void isn't attracting the objects towards it, the objects are set to move toward the void.
If you reverse this action you won't even see the objects anymore.
You should make an event in which if the objects are near the void it starts attracting them.

I see you haven't used any variables or extra conditions in any of your events. Have you followed enough tutorials to know how to make events?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Jul 25, 2013 5:45 pm

You could start this way, by just using the bullet behaviour:

system compare two values - distance(planet.x,planet.y,void.x,void.y) is less than 500

Planet - set bullet angle - angle(planet.x,planet.y,void.x,void.y)
Planet - set bullet speed - 200
Planet - set bullet acceleration - 50

From this event you can then build.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat Jul 27, 2013 5:37 pm

Ok so now how to make it so when a button is pressed, it pushes and the other pulls faster?
B
4
Posts: 11
Reputation: 247

Post » Sat Jul 27, 2013 7:31 pm

Try this , you'll need to work on it
Test.capx
B
28
S
6
G
2
Posts: 86
Reputation: 3,267

Post » Sun Jul 28, 2013 10:08 am

Umm...its not working because I have an older version of construct 2 instead. So could you like explain how to do it?
B
4
Posts: 11
Reputation: 247


Return to How do I....?

Who is online

Users browsing this forum: istero, purplemonkey, XMatrix and 9 guests