How do I set up this specific behaviour?

Get help using Construct 2

Post » Fri Dec 18, 2015 1:50 pm

Hello again :)

I'm new in Construct 2 and even though I do my best, sometimes I cannot figure out how a thing needs to be done.
My current goal is to properly set up mechanics for my game and I don't know hot to progress further.

The game mechanics consist of simple clicking into designed areas in order to create platforms, but the problem is that I don't know how to limit number of created objects. Every click creates a new platform which is a problem. My focus is to have a previous platform destroyed when a new one is created so only one platform is created at the time. Does anyone know how to do it?

Secondly, how can I create an action when a platform hold by finger changes its angle after a movement upwards or downwards have been done?
B
3
Posts: 8
Reputation: 191

Post » Fri Dec 18, 2015 2:36 pm

Sounds like you want something like this:

Give the platform an instance variable TouchAngle

on any touch start
> Destroy platform
> Create platorm at touch.x,touch.y
> Platform set variable TouchAngle to touch.y

Touch is touching
Platform set angle to :touch.y-Platform.TouchAngle

Ofcourse this is going to require some tweaking..
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 » Fri Dec 18, 2015 8:45 pm

@LittleStain

Thank you so much, it actually works :)))

I'm just surprised that the recreation of the platform method was so simple, just added Destroy action in front of "Create object"

There is only one flaw with the method you provided since the platforms are now spawned in different angles and I would like to spawn them rotated in no angle. How can I do that?
B
3
Posts: 8
Reputation: 191

Post » Fri Dec 18, 2015 10:09 pm

cyndrome wrote:@LittleStain

Thank you so much, it actually works :)))

I'm just surprised that the recreation of the platform method was so simple, just added Destroy action in front of "Create object"

There is only one flaw with the method you provided since the platforms are now spawned in different angles and I would like to spawn them rotated in no angle. How can I do that?


artist trick
B
10
S
4
Posts: 144
Reputation: 1,246


Return to How do I....?

Who is online

Users browsing this forum: Ami Samad, CJacobsSA, ismael123, lwgames, nextogogames and 3 guests