Clicking on minimap

For questions about using Classic.

Post » Thu Mar 11, 2010 11:29 pm

That example was made with version 99.84.

Here are the events I used
[code:cmyymoiz]+ MouseKeyboard: Mouse is over Box
-> Sprite: Set position to Minimap.MapToLayoutX(MouseX-Minimap.X), Minimap.MapToLayoutY(MouseY-Minimap.Y)

+ System: Start of layout
-> Box: Make Invisible
-> Box: Attach to object Minimap with 0 padding[/code:cmyymoiz]
B
79
S
24
G
52
Posts: 4,725
Reputation: 39,713

Post » Thu Mar 11, 2010 11:48 pm

[code:zr4kv2g1]MouseKeyboard: 14 On Left Clicked on Sprite 0
> Dragon Set 'Moving to Attack' to 0
> Destination Make Visible
> Destination Set position to Minimap 0 .MapToLayoutX(MouseX-Sprite 1 .Left-ScrollXLeft), Minimap 2 .MapToLayoutY(MouseY-Sprite 3 .Top-ScrollYTop)[/code:zr4kv2g1]

This accounts for scrolling, works fine :D The "Sprite" is a sprite with the same dimensions as the minimap. For some reason the box didn't work with me...
B
2
G
2
Posts: 16
Reputation: 682

Previous

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 7 guests