Need Help

I am trying to make a treasure chest on one tile in my game and you cant go on that tile unless you have the key.

So basically I need something that looks like this

Touch >>>Python

and I need the python script to go something like: when it is touching make the up arrow to DLoc=0 that way when I am sitting on that tile I can’t go forwards, It would be cool if the script would be easy to read because then I can adapt it to different situations. Thanks.

while you wait for a python guru to answer, I’ll try to show you how to do it
with Logic Bricks
There’s different ways of course, here’s one:
you can protect the treasure tile with an “invisible” wall/cube and when the player
have the key just move the wall/cube with an IPO
The second request I don’t understand it well, so:
add a “boolean” property to the object that uses the “up arrow” sensor ( the player probably) with FALSE enabled.
Then use a “Expression” ( or replace the AND) controller with “Exp:nameofbooleanpropertyhere == TRUE”, linked to the motion actuator
Now you must change this boolean property when the palyer is in the tile to “TRUE”…easy probably with collision Sensor

That would work except for this problem:

When I am on the tile that is supposed to disable the up arrow it would make the boolean property false, there I would not have any space to put an up arrow keyboard sensor that has no DLoc. Do you know what I am saying?

no space? there’s always space in the locig bricks.
i think i i’ve got it now:
collision:tile and uparrow-----and-----motion-DLoc=o.oo

Ah, yes that should work, That was easy…

This should help you guys figure out what I am trying to do:

sorry for the big picture, wanted to make sure you could read the text.

Any help guys? This is really holding me back.

I must know how your player setup is done!
Can you post a file?

Thanks, here is the file: