How to make a third actor move when two other actors collide?
Dell7730
Member, PRO Posts: 388
When Actor 1 collides with or overlaps Actor 2, then Actor 3 reacts, mainly Actor 3 Move To Actor 1 or 2. I hope that's clear enough for anyone to understand.
Best Answer
-
SLOCM3Z Posts: 797
@dellagarpo I wasn't thinking clearly about that. Sorry. If you want it to happen multiple times in 'else' have the actor change attribute to false.
Answers
When actor1 collides with actor2 change game.attribute to true
When game.attribute is true make actor3 react.
Can you please show a demo or sample? Thanks.
It's very straightforward, which part are you having problems with ?
Haven't gotten sleep for almost 3 days now so I can't think straight, lol
I have no problem having 2 actors interact how ever way I want, making a third one get involve is new to me, especially turning an attribute to true or whatever like how you said, lol
thanks for the time though, really do appreciate it...
It is as simple as . . . When actor1 collides with actor2 change game.attribute to true
I forgot to tell you, just started messing with Gamesalad and coding less than a week ago so I'm totally oblivious to what you're saying when it's not shown to me in like a whole paragraph or so, lol
hope you're not getting frustrated at me as I am with my problem, lol
after getting rid of hangover and fully rested, I finally got it to work, thanks to you... hope you can help me with another one in regards to this problem..
the first initial contact of actor 1 and actor 2 it WORKED, but when trying it again several times after, actor 3 won't respond anymore. I would like actor 3 to react every time actor 1 and 2 collides.
looking forward to your help and thanks very much
Can we see your rules ?
Inside Actor 3:
Created a Boolean named MouseLoc
if self.MouseLoc is true
move to: game.Actor1.position.x, game.Actor1.position.y
Inside Actor 1:
when Actor 1 collides or overlaps with Actor 2
Change Attribute Actor3.MouseLoc to true
Can you please show a screenshot ?
https://drive.google.com/file/d/0Bw6pFarwlI0eam1kZGVBaXBQN1E/view?usp=sharing
https://drive.google.com/file/d/0Bw6pFarwlI0eam1kZGVBaXBQN1E/view?usp=sharing
I give up.
lol why?
Lack of the will to live
The rule you posted indicates that if an attribute is true then the actor will move to some position (which you have kept hidden). It's not really much use to be honest, the only way to make the screenshot less useful would have been to somehow cover over the name of the attribute, then the information blackout would have been complete
Hold on, I feel a Photoshop image approaching . . . .
EDIT: There you go, this image coveys no information.
So......... how's your weekend going? lol
Do you know constrain attribute?
Nope not constrain. Sorry. @Socks was trying to say make a new attribute in game called 'whatever you want.boolean'. Then when actor 1 collides with actor 2 have one of them change attribute 'game.whatever you want.boolean' to true
He is the old pro but I think that is what he was trying to say before his lack of wanting to live.
I Do but that's not what I want, cause I don't want Actor 3 to touch any of the first two actors, Just want Actor 3 to Move To towards. I already have that working, it's just that once Actor 1 touches Actor 2, it works one time only and won't the next times around.
I'll try that right now, I'll let you know right away, thanks.
Booyah! It Works! Thanks so so so very much!
Your welcome.
hahahaha
So far so good, it's been pretty straightforward, except for Saturday which was weird.
Great, at least you're not lacking the will to live lol
That's what I love about this forum... all those who have a sense of humour and make me chuckle.