mouse position over actor not working

twayne1twayne1 Member Posts: 43

I want my rule to say this:
when mouse position is over actor
when mouse button is down
do: change scene.
For some reason it doesn't work. Here is a small video about it, (nothing fancy):

«1

Comments

  • IceboxIcebox Member Posts: 1,485

    when mouse position is over actor
    when mouse button is down

    Do "If touch is pressed"

  • twayne1twayne1 Member Posts: 43

    I am making a PC game. Touch does not work for a mouse.

  • twayne1twayne1 Member Posts: 43

    And why doesn't the ''over actor'' part not work?

  • IceboxIcebox Member Posts: 1,485

    Are you sure it doesnt work ? it works fine in viewer + html5 + mac OSx unless the windows version is different

  • twayne1twayne1 Member Posts: 43
    edited June 2017

    Well watch the video that I posted and tell me what ya think. Maybe the windows version is different.

  • twayne1twayne1 Member Posts: 43
    edited June 2017

    I guess if I can't find a solution I will have to use something like ''when mouse is down spawn an actor; when that actor collides, (it will be invisible,) with an actor that I want it to,( for example, a button,) it changes the scene. Lol, sounds overly complicated.

  • IceboxIcebox Member Posts: 1,485

    did you try if touch is pressed ? it will work

  • HopscotchHopscotch Member, PRO Posts: 2,782

    @twayne1

    did you maybe unlock the instance of that actor on the scene?

    Click on the tab "red button(instance)". Then select the option on the right to revert that actor to its prototype.

  • twayne1twayne1 Member Posts: 43

    Well that does nothing as expected, as they were already both identical. (I typically don't mess around with specific instances in my opinion, though I could be wrong.)

  • twayne1twayne1 Member Posts: 43

    Thanks for the advice though.

  • SocksSocks London, UK.Member Posts: 12,822

    @twayne1 said:
    I am making a PC game. Touch does not work for a mouse.

    Have you tried 'if touch is pressed' yet ?

  • IceboxIcebox Member Posts: 1,485

    @Icebox said:
    Do "If touch is pressed"

    @Icebox said:
    Are you sure it doesnt work ? it works fine in viewer + html5 + mac OSx

    @icebox said:
    did you try if touch is pressed ? it will work

    @Socks
    Have you tried 'if touch is pressed' yet ?

    I think you should give up and realise it will never happen :D

  • SocksSocks London, UK.Member Posts: 12,822

    @Icebox said:
    I think you should give up and realise it will never happen :D

    :'( :# :D :) ;)

  • twayne1twayne1 Member Posts: 43

    well thanks for that positive influence.

  • SocksSocks London, UK.Member Posts: 12,822

    @twayne1 said:
    well thanks for that positive influence.

    Have you actually tried 'touch is pressed' yet ?

  • twayne1twayne1 Member Posts: 43

    yes I have, but as it is a PC game, it does not work.

  • SocksSocks London, UK.Member Posts: 12,822

    @twayne1 said:
    yes I have, but as it is a PC game, it does not work.

    Then there must be some error in the way you have your code set up.

  • IceboxIcebox Member Posts: 1,485

    @twayne1 I'm sorry if i offended you ! I was just kidding

  • twayne1twayne1 Member Posts: 43

    How on earth do I have an error in my code? WHAT DOES THAT MEAN? Lol. Icebox just find me a solution, I don't care if you insult me to do it haha....

  • IceboxIcebox Member Posts: 1,485

    Create a new project create 2 scenes create an actor in scene 1 and do this

    if touch is pressed
    change scene

    and tell us if it works or not

  • twayne1twayne1 Member Posts: 43
    edited June 2017

    How odd. What you said worked in a different project. Why is it called ''if touch is pressed'' if I am using a mouse? Would I use that for an android game? Anyways the ''if touched is pressed'' does not work in my actor. Also, it is the only rule. Weird...

  • SocksSocks London, UK.Member Posts: 12,822

    @twayne1 said:
    How on earth do I have an error in my code? WHAT DOES THAT MEAN?

    I mean that if you have tried 'when touch is pressed' and it doesn't work, then there must be an error somewhere in your code that is preventing it from working.

  • IceboxIcebox Member Posts: 1,485
    edited June 2017

    make sure the rule is in "prototype" tab not the instance . delete the actor from the scene then drag it back into the scene. Never place your code in the instance tab and if you see a lock image dont click on it . Do it and tell me if it works

  • twayne1twayne1 Member Posts: 43

    nope still doesn't.

  • IceboxIcebox Member Posts: 1,485

    delete the actor get rid of it :) . create a new actor and do
    if touch is pressed
    change scene

    do it and tell me if it works or not. if you can show us what your doing on another youtube video , that would be awesome. If you cant ill hunt you down until it works :)

  • twayne1twayne1 Member Posts: 43
    edited June 2017

    Nope it doesn't work.

  • twayne1twayne1 Member Posts: 43
    edited June 2017

    I will put a video in a few minutes....

  • twayne1twayne1 Member Posts: 43

  • SocksSocks London, UK.Member Posts: 12,822

    Can we see the layers (screenshot) for that scene ?

  • IceboxIcebox Member Posts: 1,485
    edited June 2017

    This is really odd.. i can't think of anything that might cause an issue with a simple rule like this :/

Sign In or Register to comment.