How To Set Actor Touch Position
tanchowyeeiosapp
Member, PRO Posts: 36
in Tech Support
I'm newbie on gamesalad, can everyone help for this?
http://postimg.org/image/3rniw212n/
I already set the actor able to move anywhere, and the picture show is one actor only.
Now when I touch A and B the actor also can move, but I want seperate only touch A can move, if touch B the actor will not move. What should I to do?
....
Comments
Are A and B both using the same actor and same image, or two different actors and two different images?
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Armelline, A & B is same actor, also use 1 image, that mean same image...
Then they will always move together. You need to split them into two actors in order to have them move independently.
If you want both to move when you touch A (but not when you touch , add a condition saying something like "When touch is pressed and touch.position.y > self.position.Y+100", that will mean only touches near the top are registered.
If you're trying to make B swing like a rope though, that's not very easy but there are tutorials out there.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Armelline, I have try seperate 2 actor before, one is for A and one is for B, I also need A & B move togather when I touch A, but how to join the actor A and B togather?
Armelline, I know swing like a rope is very difficult for newbie, I just want to know how actor A and Actor B combine togather...
You just admitted you're in over your head and then ask Him to code it for you like that is easy to explain. you see the contradiction in your question there, right? It's always best to be building projects at or just above your level of knowledge. you don't learn anything by having people do your work for you. If you're really serious about being a developer you can't skip the important steps of learning.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
The_Gamesalad_Guru: Forum is for asking question, something you don't know you can ask here, that is no problem, I ask the question here, because I want to learn, you thing just 2 actor can do all my work, just 2 actor can complete all the game project?
As he said there are tutorials out there you can watch that can explain it all. some things can't just quickly be explained in a forum post.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
The_Gamesalad_Guru, I think you want invite me to join your course? right?
I have no course and all my videos are free
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
So, I ask question here, do you have any solution?
I do but it would take me too long to type it all out as it's not easy to explain.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
The_Gamesalad_Guru you have reply this post 3 time, so do you have any solution to the topic? "How To Set Actor Touch Position"
Not sure I fully understand this question but let's see how far off I am.
You want actor B to follow actor A when actor A is touched but you want to keep the distance between the two the same when you're dragging A? Is that correct? And I'm guessing you want the same to happen if you drag actor B. You want A to follow but at the same distance it was at before the drag started?
The image I show you below is only 1 actor not 2 actor...
http://postimg.org/image/3rniw212n/
The image show that A & B actor position,
You clear for the above explain? if not I will explain again...
I can't view that image at work as the site is listed as one that often hosts adult related images.
And no it's not so clear now. Which is a shame as I wrote out the code to have the actors drag behind each other based on my understanding of your question.
Will have another go...
You've got one actor, and if they press one side/half of the actor you want to register the touch and do something, but if they touch the other side of the same actor you want to ignore the touch
If touch is inside and Touches.Touch 1.X <= self.Position.X + (self.Width / 2)
...Constrain Attribute: self.Position.X = Touches.Touch 1.X
...Constrain Attribute: self.Position.Y = Touches.Touch 1.Y
That should register touches on the left half of the actor. You can do the same with Mouse Position.X or whatever it's called.
I'm not near GameSalad to try this so I can't guarantee this will continue working when you're dragging the actor around the scene.
I think this is what you are after:
I have capture the video here, everyone can help me this?
I'm not well speaking English, Sorry for the broken english,
Here the video:
Here the Rule screenshoot, I set for the 3 actor
http://s1219.photobucket.com/user/cyee19862/media/Rule.jpg.html
...
Merged the duplicate threads.
(Please don't duplicate threads. Just bump the original one when an appropriate amount of time has passed.)
You know how to solve this problem? Because I think many people don't understand what I say before, so I capture the video...
Yes, I know how to solve the problem. And I gave an answer. Look at the posting just before the video.
RThurman, I newbie, I just learn the gamesalad around 2 week, avobe rule you tell me, I'm not very understand...
I have set the first rule: Actor receives events: "touch" is "Pressed"
Here the screenshoot: http://s1219.photobucket.com/user/cyee19862/media/1_1.jpg.html
But I don't know how to set "Expression: game.Mouse.Position.Y- self.Position.Y > 100"
Can you tell me more detail how to set this second rule?...
Here is a GameSalad example to study.
Click the mouse near the top of the actor and it moves. Touch too low and the actor won't move.
Hi, RThurman, for starting I really not familier to gamesalad, but I have no chooise, I need to try again the rule above, now I follow what you say to set the rule, Thank You Very Much RThurman, You Are you Are Awesome!!!
Really Really Really, Thank You very much, @RThurman
You are very, very welcome!
Hi, @RThurman, Last time you help me set the above rule, everyting work well, Now I can touch position A move around without problem. I have another question about this, I also need only position A "Overlaps or Collides" something only A Position can detect, if B position touch something, B will not detect, can I know what should I to set for this?...
http://postimg.org/image/3rniw212n/
...