Lunar Lander. landing orientation problem
rszarka
Member Posts: 6
Hi guys
I am very new to game salad. this is probably a basic question to many here but i can't seem to find the answer no matter how much i search.
I am building a lunar lander game, the problem i am trying to solve is.... if any other part of my landing craft other than the landing feet land on the platform that the craft is destroyed.
right now even if the craft lands upside down it will land which is a problem... I somehow managed to get all the logic set up to land the craft, stop the movement...the gravity of the scene etc... I just don't understand how to assign parts of an actor to act or react differently than other parts.
Thanks for any help
Comments
Probably the easiest thing to do would be to check the actor's rotation when it lands. If its upright (within a few degrees) then it landed successfully. Otherwise, kaboom!
Well thats the idea but the logic to create it is the struggle.. i gave it a go..made an attribute lander-rotation constrained to the actors rotation..then in the landing pads logic..made a couple of rules for the collision of the lander with the platform... telling it to bounce the actor away if the rotation was a few degrees over or under 0 ...seems to do the trick..i didn't want the actor to die if the angle was just a little wrong so have made it bounce away instead giving the player another go.... based on this same logic i applied some more rules where if the rotation was over or under x degrees then it would destroy the actor.... so many thanks for the idea..while you didn't give me the logic you gave me the idea and possible solution to the riddle which made me use my brain and figure it out which is way better hahah thank you
I wish more people would say that on this forum.
Mental Donkey Games
Website - Facebook - Twitter
You don't really need to duplicate attributes, there is already an attribute called rotation so there's no real need to make another one - and introduce an unnecessary Constrain behaviour (the fewer Constrain behaviours the better, as unlike something like a Change attribute behaviour Constrain behaviours run constantly, eating up processor power).