Editor Help ... later more ask

Get help using Construct 2

Post » Wed Nov 30, 2011 4:21 pm

I make a Editor in Contruct 2

I need a event ...set the Tile to a grid 16x16, in MMF2 is this "set Position(Object)to((XMouse/16)*16)" in Contruct 2 dont working "set Position(Object)to((Mouse.X/16)*16)".

how does it work?
B
2
S
1
G
4
Posts: 18
Reputation: 1,236

Post » Wed Nov 30, 2011 4:34 pm

In the sticky how do I FAQ you have a lot of useful links.

In there a section Tiling in which you can find:
Quick tiling : LINK which should answer your question and help you moving on in C2.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
271
S
99
G
70
Posts: 7,267
Reputation: 75,769

Post » Thu Dec 01, 2011 8:50 am

Thanks Kyatics... this dont help

i need ... the tile follow the mouse in 16x16 steps
B
2
S
1
G
4
Posts: 18
Reputation: 1,236

Post » Thu Dec 01, 2011 8:53 am

+Every Tick
-Set Tile.x to int(mouse.x/16)*16
-Set Tile.y to int(mouse.y/16)*16
Image
B
236
S
28
G
13
Posts: 1,784
Reputation: 18,429

Post » Thu Dec 01, 2011 9:17 am

Nice Thanks Tokinson :)
B
2
S
1
G
4
Posts: 18
Reputation: 1,236

Post » Thu Dec 01, 2011 12:05 pm

yeah MMF2 is a pain, it round off position values... if you want smooth interpolations of position you need to use variables

Fortunately in cc and c2... it's not the case.
So yeah if you want this behavior you need to round them off yourself (with int() or floo())
B
64
S
22
G
14
Posts: 1,482
Reputation: 16,457


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests