Mouse position is over. Question
CodeMonster
ACT, AustraliaMember Posts: 1,078
Just a quick question. If I use this rule. Would it work for as touch being pressed or dragged on the screen?
Caus I have a left and right button and I don't want the person to have to lift there finger and place down again to move left and right. So would this work for the iPhone?
Rule: for left button
When
Mouse position is over actor
Do>
Move left
Rule for right button:
When
Mouse position is over actor
Do>
Move right.
So you can slide your finger to the left button and back to the right so u can move left and right like that.
Would this work as a finger?
Sorry if I'm confusing
Thanks in advance!
Caus I have a left and right button and I don't want the person to have to lift there finger and place down again to move left and right. So would this work for the iPhone?
Rule: for left button
When
Mouse position is over actor
Do>
Move left
Rule for right button:
When
Mouse position is over actor
Do>
Move right.
So you can slide your finger to the left button and back to the right so u can move left and right like that.
Would this work as a finger?
Sorry if I'm confusing
Thanks in advance!
Comments
The second question is... what is "mouse position is over actor"? Do you mean 'Actor receives event mouse position is inside'? Or do you mean 'Actor receives event touch is inside'? Or maybe something else?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
https://www.dropbox.com/s/3zs9z4jhguvfo4z/left & right buttons.zip
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
And no it's a rule:
When mouse position is over actor
And when I hover the mouse button over the actor, the rule will work.
But since there isn't a mouse when playing on the iPhone. Would a finger be used to hove on the button?
@tatiang
GSINVENTION FREE TEMPLATES
So stick with when mouse (touch) is inside perhaps, which could be considered the closest to when mouse is over.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Thanks though!
GSINVENTION FREE TEMPLATES
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
And thanks heaps I'll look at the demo again.
And yeh I can't test at the moment as I don't have access to my mac for another week.
An yeh thanks @tatiang
GSINVENTION FREE TEMPLATES
Left arrow button
When touch is inside
Change attribute game.direction (integer) to -1
Otherwise
Change attribute game.direction to 0
Right arrow button
When touch is inside
Change attribute game.direction (integer) to 1
Otherwise
Change attribute game.direction to 0
Moving actor
When attribute game.direction = -1
[move to the left]
When attribute game.direction = 1
[move to the right]
*You can set the values to anything you like... they don't need to be 0, -1, and 1, but that's usually what I use.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
My mistake...
Thanks @tatiang
GSINVENTION FREE TEMPLATES