Cursor is over

Just started using Construct 2? Post your questions here

Post » Sun Oct 04, 2015 12:24 pm

So, I made a game where you put your cursor is over a sprite, that one moves out of the screen and a new one goes where the old one was.
Well,it works, but then it just stays like that for the whole game.
So,in the event sheet, I put Else and then the reversed thing.
But then,it just flashes uncontrollably.
Is there a better way to do this or if not,can I fix the flashing?
B
4
Posts: 12
Reputation: 224

Post » Sun Oct 04, 2015 11:11 pm

VikiPedia wrote:So, I made a game where you put your cursor is over a sprite, that one moves out of the screen and a new one goes where the old one was.
Well,it works, but then it just stays like that for the whole game.
So,in the event sheet, I put Else and then the reversed thing.
But then,it just flashes uncontrollably.
Is there a better way to do this or if not,can I fix the flashing?

Can you post a screenshot of the your code?
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,848

Post » Mon Oct 05, 2015 10:21 am

Message: VikiPedia is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
B
4
Posts: 12
Reputation: 224

Post » Mon Oct 05, 2015 10:23 am

imgur . com /py7PPIR
B
4
Posts: 12
Reputation: 224

Post » Mon Oct 05, 2015 11:30 am

VikiPedia wrote:imgur . com /py7PPIR

The link doesn't show anything, even when spaces are removed.
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,848

Post » Mon Oct 05, 2015 11:37 am

That is because I don't have enough reputation to post a link.
B
4
Posts: 12
Reputation: 224

Post » Mon Oct 05, 2015 11:45 am

VikiPedia wrote:That is because I don't have enough reputation to post a link.


Adding spaces was the correct thing to do, but it's just that the resultant url doesn't show anything.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
137
S
31
G
87
Posts: 5,555
Reputation: 60,454

Post » Mon Oct 05, 2015 1:44 pm

imgur .com/kHbCM5s
B
4
Posts: 12
Reputation: 224

Post » Mon Oct 05, 2015 3:18 pm

You have to remember that the "Else" is linked/based on the former event. Which means that as long as mouse cursor is not over sprite8, the "Else" will trigger true. So your code switches between "Mouse cursor over sprite8" being true, which moves sprite8 to 2000,2000 and then the next tick the "Else" will be true moving it back again. Which explain why you see it flicker or flashing.
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,848

Post » Mon Oct 05, 2015 3:32 pm

Ok, do you know another way to do the same thing?
B
4
Posts: 12
Reputation: 224

Next

Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest