mikenet2007 Posted July 1, 2014 What would a script look like where the action occurs the second time the script is triggered? Say I wanted a floor to lower after a player walks over a line twice. 0 Share this post Link to post
scifista42 Posted July 1, 2014 Set a variable to count how many times the script has been triggered. For example like this: #include "zcommon.acs" int i = 0; // variable declaration script 1 (void) { i++; // adds 1 to the value of i if(i==2) { // condition Floor_LowerToLowest(1,8); // action } }I hope you get the idea. The script will be actually triggered every time you cross the linedef. Variable stores a value (number), which increases every time the script is called, and the value is always checked if it's equal to 2, and if it is, your floor-lowering action is performed. 0 Share this post Link to post
mikenet2007 Posted July 1, 2014 Neat, That should work fine, thanks. I'm still fairly script illiterate with the exception of the easy ones. 0 Share this post Link to post