I have an object that always set's its position to the X and Y of the mouse. I made it so repeat while user clicks: Paste object into background (Not an obsticle).
But if I move the mouse too fast then it pastes them like dots. It's hard for me to explain :S
Like, if I move the mouse fast around the screen while holding the mouse button it does paste them into the background but it leaves large gaps between them. I want it to be smooth and for it to not have any gaps.
If you don't understand then just create a quick app using the descriptions above and you will see what I mean
Hey guys, if you need a spritist or someone to create anything about art:
-Logos
-Cut-scenes
-Sprites
and all sort of other things, then just send me an email or PM me!
The problem is that the frame rate is probably only 50fps. That means an object is pasted into the backdrop every 2 1/100ths of a second. During that time, your object can have moved quite a long way.
The solution is to use the "move safely" extension.
The events look something like this:
1.)
+ start of frame
-> move safely: add "object" to protection
2.)
+ always
-> move safely: prepare safety
-> object: set X position to mouse X
-> object: set Y position to mouse Y
-> move safely: commence safety procedure
3.)
+ on safety
+ repeat while left mouse button is down
-> object: paste image into background
4.)
+ left mouse button is clicked
-> object: paste image into backdrop
Yeah that didn't work for me (Unless I did something wrong) but someone made an example in the other forums.
Hey guys, if you need a spritist or someone to create anything about art:
-Logos
-Cut-scenes
-Sprites
and all sort of other things, then just send me an email or PM me!
I came across this problem once. I found a way to stop the gaps but for some reason it kept pasting them in straight lines. I had two counters, one was X, the other Y and I made this code:
If X_counter is less than XMouse: add one to counter
If Y_counter is less than XMouse: add one to counter
Then I just made it so the counters went down by one when they were greater than the mouses position.
So I had two counters that every frame, would set their value towards the position of the mouse, then I just made it so the object always got pasted at the X and Y coordinates of the counter values.
Not sure why it made it paste in straight lines tho :S
Maybe you could put some of that stuff in fastloops so it calculates the position quicker i dunno.