simple puzzle?

i am making a rpg. in it i want the classic switch puzzles:
the one where you have to walk onto a switch, then the switch will go down and a door opens.

and the one where the switch will go up if you walk of it, so that you will need to place something onto it, like a crate.

i am not very good at scripting yet, so i would really apreaciate all the help i can get.

hanks in advance.

No offense, but if you’re “not very good at scripting yet”, you shouldn’t be making an RPG, MMO, or first person shooter.

You gotta learn to crawl before you can run. Start with something small, like pong, space invaders, or a breakout clone, and work your way up from there!

im sorry. i might have been a bit unclear.

when i said “not very good at scripting yet” i didnt mean that im quite new to unity-javascript. i do have a fearli good understanding of scripting (i have programmed using: python, c++, ruby, rgss) and i have made 2d rpgs in the past, so i think i can pull this of, at least with some help from the unity foum :smile:

so i would really apreciate if i could get some help with making the block-pushing-onto-switch-puzzle.

pseudoCode, when something collides with the button on which you must place yourself or crate or something.

This is on the button:

[reference the door script then]
function OnCollisionEnter()
{
  animation.Play(buttondown);
  doorScript.Open();
}

function OnCollisionExit()
{
 animation.Play(buttonup);
 doorScript.Close();
}

this is on the door instead

function Open()
{
  animation.Play(OpeningAnim);
}

function Close()
{
  animation.Play(ClosingAnim);
}

This is really basic example.
Of course in the middle you can place whatever you want…a check function to see if the “puzzle” is complete, sounds, messages, whatever you want.

thank you for the reply.

I really apreciate it :smile:

My mistake.

You’d be surprised how many people with no prior experience think their first game is going to be the next World of Warcraft/Final Fantasy/Halo.

lol yea ik now allready from previous game development forums :stuck_out_tongue: