Drag And Drop Object Speed ?

Get help using Construct 2

Post » Mon Jan 23, 2017 10:39 am

is it possible to make an object move at custom speed while dragging it ? like when you drag it.. there is a delay.. not going direct to mouse or is there any other way to do it ?
B
8
S
3
Posts: 46
Reputation: 708

Post » Mon Jan 23, 2017 10:49 am

To achieve this I think you'd have to have two separate objects. One object would have the drag and drop behaviour, the other object should be given a basic steering behaviour to ensure it always moves towards the other.
Something like Move x pixels at angle(Self.X,Self.Y,DragDrop.X,DragDrop.Y)
The LEVEL GENERATOR TOOLKIT



24 functions dedicated to producing randomly generated terrain for all kinds of games.
B
25
S
7
Posts: 242
Reputation: 2,306

Post » Mon Jan 23, 2017 11:08 am

Steering Behavior ??
B
8
S
3
Posts: 46
Reputation: 708

Post » Mon Jan 23, 2017 12:03 pm

Yeah, like the example given. A steering behaviour is a generic term for a behaviour that causes one thing to move in the direction of (or away from the direction of) another object. The simplest example in Construct 2 is using the 'Move at angle' action using the angle between the two objects.
The LEVEL GENERATOR TOOLKIT



24 functions dedicated to producing randomly generated terrain for all kinds of games.
B
25
S
7
Posts: 242
Reputation: 2,306

Post » Mon Jan 23, 2017 12:23 pm

There's a CapX here if you want it, with a few little refinements and notes.

https://drive.google.com/open?id=0Bwizs ... 2FXaGlNbWc
The LEVEL GENERATOR TOOLKIT



24 functions dedicated to producing randomly generated terrain for all kinds of games.
B
25
S
7
Posts: 242
Reputation: 2,306


Return to How do I....?

Who is online

Users browsing this forum: Anna Nehves Br, divsyntax, volumetv and 9 guests