Aller au contenu

Photo

Setting up pressure plates


  • Veuillez vous connecter pour répondre
Aucune réponse à ce sujet

#1
sea-

sea-
  • Members
  • 264 messages
I want I build a small puzzle where the player has to stand on some pressure plates in order to get a chest to appear.  Simple stuff, more or less, but I can't figure out how to make the pressure plates activate.

Based on scripts in the original campaign I am using something that looks like this:

case EVENT_TYPE_ENTER:
        {
            DisplayFloatyMessage(GetHero(), "hello");

            if (WR_GetPlotFlag(PLT, PRESSURE_PLATE_1_PRESSED) == FALSE)
            {
                WR_SetPlotFlag(PLT, PRESSURE_PLATE_1_PRESSED, TRUE, TRUE);
                SetPlaceableState(OBJECT_SELF, PLC_STATE_TRAP_TRIGGER_DISABLED);
            }

            bEventHandled = TRUE;

        break;
        }

        case EVENT_TYPE_EXIT:
        {
        	DisplayFloatyMessage(GetHero(), "bye");    
	if (WR_GetPlotFlag(PLT, PRESSURE_PLATE_1_PRESSED) == TRUE)
            {
                WR_SetPlotFlag(PLT, PRESSURE_PLATE_1_PRESSED, FALSE);
                SetPlaceableState(OBJECT_SELF, PLC_STATE_TRAP_TRIGGER_ENABLED);
            }
            bEventHandled = TRUE;

        break;
        }

I know this kind of works because my floaty messages show up, but the pressure plates do not change state as they should.  They don't animate or play any sounds.  The dwarven noble puzzle at the beginning of the game uses a more complex but essentially identical method of triggering the pressure plate animations, but for whatever reason it's not working for me.

Anyone have any ideas?  It's probably fairly obvious, but I just don't have a lot of experience using trap-like things (though I figured out using "generic" traps like tripwires just fine).

Modifié par sea-, 11 janvier 2013 - 05:47 .