Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → All touchy feely (pressure plates)
All touchy feely (pressure plates)
2004-11-26, 1:01 PM #1
For some reason, or perhaps for no reason at all, I can't get some surfaces on the floor to send a touched message when the player walks on them.

Here's the code...

Code:
touched:
 if(GetSenderRef()==block_n) {
  plrblock=1;
  SetSurfaceMat(block_n, on);
  SetSurfaceMat(block_e, off);
  SetSurfaceMat(block_s, off);
  SetSurfaceMat(block_w, off);
  return;
 }
 if(GetSenderRef()==block_e) {
  plrblock=2;
  SetSurfaceMat(block_n, off);
  SetSurfaceMat(block_e, on);
  SetSurfaceMat(block_s, off);
  SetSurfaceMat(block_w, off);
  return;
 }
 if(GetSenderRef()==block_s) {
  plrblock=3;
  SetSurfaceMat(block_n, off);
  SetSurfaceMat(block_e, off);
  SetSurfaceMat(block_s, on);
  SetSurfaceMat(block_w, off);
  return;
 }
 if(GetSenderRef()==block_w) {
  plrblock=4;
  SetSurfaceMat(block_n, off);
  SetSurfaceMat(block_e, off);
  SetSurfaceMat(block_s, off);
  SetSurfaceMat(block_w, on);
  return;
 }
return;


I feel like I'm missing something obvious.
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2004-11-26, 1:05 PM #2
Use entered instead of touched.
May the mass times acceleration be with you.
2004-11-26, 2:12 PM #3
That did it, alright. Thanks a lot! :D
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.

↑ Up to the top!