ok I think your trying to do an up and down,left and right button... if thats the case think you have to create 2 game attributes one for X and one for Y... Then the button you press change those attributes depend of the orientation... if you want to go up increase Y, down decrease Y...and so on Then constrain your actor position X and Y to those values... I never did it before but I think that should work
Im kind of new here but as far as i know have to be done with attributes... game attributes not actors attributes... so you can use them with any actor on the scene... Dont know if this help you, probably somebody else knows better...
Example: set global attribute integer called "move" On actor one, set rule to "if pressed change global.move to 1" On actor two, set rule to "if global.move = 1 do something" Go from there
First set an attribute in the game, call it move make it boolean and let it be false.
Then make a rule for that object or actor that says, when touch is pressed change attribute of move to true.
Then go to your actor you want to move and make a rule, when attribute of move is true, then add behaviour that says, when Move is true, add behaviour MOVE to the rule and have it move in the direction you want it to move.
Once you get that working you can see how easy it is to do so you could make a joystick or whatever you want and when you press an actor it will affect the other actor.
Make sense., if not let me know and I will make you a small project file, getting a handle on variables is the most important factor in GS, IMHO
Comments
Then the button you press change those attributes depend of the orientation... if you want to go up increase Y, down decrease Y...and so on
Then constrain your actor position X and Y to those values... I never did it before but I think that should work
Dont know if this help you, probably somebody else knows better...
On actor one, set rule to "if pressed change global.move to 1"
On actor two, set rule to "if global.move = 1 do something"
Go from there
First set an attribute in the game, call it move make it boolean and let it be false.
Then make a rule for that object or actor that says, when touch is pressed change attribute of move to true.
Then go to your actor you want to move and make a rule, when attribute of move is true, then add behaviour that says, when Move is true, add behaviour MOVE to the rule and have it move in the direction you want it to move.
Once you get that working you can see how easy it is to do so you could make a joystick or whatever you want and when you press an actor it will affect the other actor.
Make sense., if not let me know and I will make you a small project file, getting a handle on variables is the most important factor in GS, IMHO
mike
Just look under CodeMonkey's profile - should be there!
Hope that helps,
QS