Can the command Setx do this? AFAICT it does not. perhaps I have it set up wrong or have a simple syntax error that I don't see. this is the script I'm referencing:
begin ST_cont_scrp ; silentthief's container script ; declares variable (short) for ; container for use from ; other script short ST_cont end ST_cont_scrp
and this is what I'm trying to do with it:
Begin ST_test_script long lookref short reftype long checkref float plrHowFar If ( MenuMode ) Return Endif Setx lookref to xGetPCTarget if ( lookref == 0 ) set reftype to 0 return ;looking at nothing endif Setx checkref to lookref->xRefType xSetRef, lookref setx plrHowFar to xDistance, checkref if ( checkref == 1414418243 ) if ( plrHowFar < 200 ) messagebox "container" ;ref->xPostion FLOAT_x, FLOAT_y, FLOAT_z, FLOAT_zRot set reftype to 1 ;return endif elseif ( checkref == 1380929348 ) if ( plrHowFar < 200 ) messagebox "door" ;ref->xPostion FLOAT_x, FLOAT_y, FLOAT_z, FLOAT_zRot ;set reftype to 2 ;return endif else return ; I don't believe there are any more objects that can be locked/trapped...? endif ; should have xsetref already set from before the if block ? xSetRef lookref Setx ST_cont_scrp.ST_cont to 1 ;the line above is a reference to the other script (ST_cont_scrp) to modify the variable (ST_cont) ;and does NOT work. And Set command does not work with object variables end ST_test_script
this is the testing phase of my trap project. So far, I've determined that MWSE is necessary to finish it, and I can find the reference type to what the player is looking at (container or door in this example) and I've figured out how to test for the disarm action. But I'm trying to make sure the reference to the exact container is absolute (and not just the "first on the list" located in the cell)
ST
ps I think I'll have a working beta for this in within the next week... will let you all know