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
G
4
Posts: 18
Reputation: 1,086

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
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

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
G
4
Posts: 18
Reputation: 1,086

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
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Thu Dec 01, 2011 9:17 am

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

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
60
S
22
G
14
Posts: 1,479
Reputation: 16,346


Return to How do I....?

Who is online

Users browsing this forum: blackhornet, jeffige, TheHat and 1 guest