SpyMouse

Get help using Construct 2

Post » Fri Apr 20, 2012 3:24 am

i have a question and i don't know how to explain it but the thing i want to do can find in SpyMouse game app.

the thing i want is when we touch the mouse and move the finger there is a line with a dot in the end how can i make these?

and how can i make the dot collision with wall if the finger moved on the wall??

also how can i make the player moves while im making the line should i put 8dircetion or drag and drop or both??

also if i stopped in the middle and clicked on the dot i can complete the line??

could i do these with touch plugin or just mouse??

here is a picture i made for how the line should look likes:


you can use the black one :




thanks for reading,helping me ^^





zsangerous2012-04-20 11:09:08
B
45
S
15
G
6
Posts: 795
Reputation: 11,935

Post » Fri Apr 20, 2012 3:10 pm

any idea?
B
45
S
15
G
6
Posts: 795
Reputation: 11,935

Post » Fri Apr 20, 2012 3:40 pm

soooooo you wanna draw a line between 2 points and those points are click start and click end?

Im not entirely sure but I think you need a plugin for the line drawing but to get the points to draw the line between youd get the mouse x and y when you first click it. Thats the first point. Then the x and y again when you let go of the button. Thats the second point.

You might be able to make a 1x1 pixel sprite of some color and stretch and rotate that sprite between the points to make a line I dont really know tho.

As for the collision with walls make it so the points cant be generated if the mouse is over the walls
B
13
S
5
G
2
Posts: 306
Reputation: 3,262

Post » Fri Apr 20, 2012 4:13 pm

Ho it's about drawing a line ?
I didn't understand what was asked in the first post tbh.

Check the how do I FAQ

[quote]Draw a line from point A to point B - LINK[/quote]

No need for plugins or anything complicated/fancy.
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 » Fri Apr 20, 2012 5:38 pm

@Kyatric @aridale
i thing i want is drawing a line but in the end of it there is a circle, also the line has some gabs ,see the thing i want:


how does it work?
click on player then move the mouse while clicking if i released my finger it stop and when i click on the circle and move my finger it keeps drawing lines and the circle destroy and when i release my finger another circle comes its exactly like spymouse game

see this video how it work:
http://www.youtube.com/watch?v=C9oTQ_e-njEzsangerous2012-04-20 17:39:22
B
45
S
15
G
6
Posts: 795
Reputation: 11,935

Post » Fri Apr 20, 2012 7:03 pm

I made something that is very close to what you want but not quite complete as I can't figure out yet how to keep an equal distance between the rectangles drawn while dragging and how to make them spawn only when the mouse has moved a certain distance. hope someone can look at it and figure it out. but for now it should help you, try to mess about with it.

http://www.sendspace.com/file/8e2unq

hope it helps
B
16
S
3
G
4
Posts: 40
Reputation: 3,877

Post » Fri Apr 20, 2012 7:13 pm

@KiyowaraKush
i have reuploaded your .capx to dropbox just to let more people to download it , i liked the thing you have did but the problem is when i click and the mouse doesn't move it keeps create sprites while i don't want, also when i move my mouse very fast it create a long gab between the sprites,
i think if these 2 things fixed it will work almost 90% , thanks for your help ill try to do stuffs till i find a way ^^


http://dl.dropbox.com/u/67034121/forum/draw%20path.capx
B
45
S
15
G
6
Posts: 795
Reputation: 11,935

Post » Fri Apr 20, 2012 7:47 pm

Instead of creating a line segment at time intervals do it at distance intervals, that way they will be equally spaced.
http://dl.dropbox.com/u/5426011/examples10/dashed_line.capx
B
79
S
24
G
53
Posts: 4,728
Reputation: 40,219

Post » Fri Apr 20, 2012 9:22 pm

@R0J0hound
your work is really good thanks but could you make in the end of it like a circle or something so when i release from clicking i can click on the circle and re-lining the line again ?


B
45
S
15
G
6
Posts: 795
Reputation: 11,935

Post » Sat Apr 21, 2012 6:44 pm

ok i have edited some of your work @R0J0hound and its almost done but now i have 2 simple problem im trying to finding how to solve it

1)the player speed is the same as mouse and i want it has a constant speed
2)when i click on the layout it create line and i want when i click on player then move the mouse then it create lines ^^

see the .capx i made : http://dl.dropbox.com/u/67034121/forum/line%20games.capx
B
45
S
15
G
6
Posts: 795
Reputation: 11,935

Next

Return to How do I....?

Who is online

Users browsing this forum: Khamsou and 17 guests