d1vanov Posted December 24, 2010 Share Posted December 24, 2010 (edited) Hello there. I've created a brand new model of a backpack:http://img.pixs.ru/thumbs/6/7/8/ARMOLeathe_7650761_1318678.jpg It works fine in game, but I want to make it a bit more functional than other existing backpacks: as you can see, this backpack has a folded mattress. I'd like to make it usable in the following way: when the backpack is dropped out of the inventory (i.e. its world model lies on the floor) you activate it and have a message menu: 0) Open the backpack as a container (to use the backpack as a portable container, one more feature I'd like to add)1) Take the backpack (and move all the stuff from the container to player's inventory)2) Unfold the mattress (replace the model of the backpack to a mattressless one and make the mattress appear nearby)3) Fold the mattress (replace the model of the backpack backwards and make the unfolded mattress "fold", i.e. disappear again) I know the portable container script can be complicated and require NVSE (there was a similar Fo3 mod that used FOSE) but now I have a much more general problem: my message buttons don't work at all :( Here's what I'm trying to do now: Begin GameMode if ( AwaitingResponse == 1 ) if ( ButtonVar > -1 ) if ( ButtonVar == 0 ) ShowMessage LeatherBackpackTestMsg0 elseif ( ButtonVar == 1 ) ShowMessage LeatherBackpackTestMsg1 elseif ( ButtonVar == 2 ) ShowMessage LeatherBackpackTestMsg2 elseif ( ButtonVar == 3 ) ShowMessage LeatherBackpackTestMsg3 endif endif Set AwaitingResponse to 0 endif End Begin OnActivate Player ShowMessage LeatherBackpackOnActivateMsg Set ButtonVar to GetButtonPressed Set AwaitingResponse to 1 ; variants: ; 0 - Open the backpack (as a container) ; 1 - Take the backpack (all the stuff from the container should be moved to player's inventory) ; 2 - Unfold the mattress (replace the model of the backpack and make the mattress appear) ; 3 - Fold the mattress (replace the model of the backpack and make the unfolded mattress on the floor disappear) End In game I see LeatherBackpackOnActivateMsg message with buttons of choice but any button pressed has no effect at all, I can't see further test messages showing my buttons work (because they don't actually). The only reason I can conjecture is the armor nature of the leather backpack world models (i.e. they aren't misc items that work pretty fine with these functions). Any help with this problem would be greatly appreciated. Edited December 24, 2010 by d_ivanov Link to comment Share on other sites More sharing options...
thc1234 Posted December 24, 2010 Share Posted December 24, 2010 Begin GameMode if ( AwaitingResponse == 1 ) Set ButtonVar to GetButtonPressed if ( ButtonVar > -1 ) if ( ButtonVar == 0 ) ShowMessage LeatherBackpackTestMsg0 elseif ( ButtonVar == 1 ) ShowMessage LeatherBackpackTestMsg1 elseif ( ButtonVar == 2 ) ShowMessage LeatherBackpackTestMsg2 elseif ( ButtonVar == 3 ) ShowMessage LeatherBackpackTestMsg3 endif endif Set AwaitingResponse to 0 endif End Begin OnActivate Player ShowMessage LeatherBackpackOnActivateMsg Set AwaitingResponse to 1 ; variants: ; 0 - Open the backpack (as a container) ; 1 - Take the backpack (all the stuff from the container should be moved to player's inventory) ; 2 - Unfold the mattress (replace the model of the backpack and make the mattress appear) ; 3 - Fold the mattress (replace the model of the backpack and make the unfolded mattress on the floor disappear) End Link to comment Share on other sites More sharing options...
d1vanov Posted December 25, 2010 Author Share Posted December 25, 2010 Thanks a lot, it works at least ) Link to comment Share on other sites More sharing options...
Recommended Posts