GameSalad

mouse position over actor not working

twayne1twayne1 Posts: 43Member

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 Posts: 1,434Member, PRO

    when mouse position is over actor
    when mouse button is down

    Do "If touch is pressed"

  • twayne1twayne1 Posts: 43Member

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

  • twayne1twayne1 Posts: 43Member

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

  • IceboxIcebox Posts: 1,434Member, PRO

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

  • twayne1twayne1 Posts: 43Member
    edited June 26

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

  • twayne1twayne1 Posts: 43Member
    edited June 26

    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 Posts: 1,434Member, PRO

    did you try if touch is pressed ? it will work

  • HopscotchHopscotch Posts: 2,716Member, PRO

    @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 Posts: 43Member

    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 Posts: 43Member

    Thanks for the advice though.

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

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

    Have you tried 'if touch is pressed' yet ?

  • IceboxIcebox Posts: 1,434Member, PRO

    @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.Posts: 12,725Member

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

    :'( :# :D :) ;)

  • twayne1twayne1 Posts: 43Member

    well thanks for that positive influence.

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

    @twayne1 said:
    well thanks for that positive influence.

    Have you actually tried 'touch is pressed' yet ?

  • twayne1twayne1 Posts: 43Member

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

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

    @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 Posts: 1,434Member, PRO

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

  • twayne1twayne1 Posts: 43Member

    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 Posts: 1,434Member, PRO

    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 Posts: 43Member
    edited June 26

    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.Posts: 12,725Member

    @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 Posts: 1,434Member, PRO
    edited June 26

    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 Posts: 43Member

    nope still doesn't.

  • IceboxIcebox Posts: 1,434Member, PRO

    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 Posts: 43Member
    edited June 26

    Nope it doesn't work.

  • twayne1twayne1 Posts: 43Member
    edited June 26

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

  • twayne1twayne1 Posts: 43Member

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

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

  • IceboxIcebox Posts: 1,434Member, PRO
    edited June 26

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

«1
Sign In or Register to comment.