Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
ranhcase

One-Time Only Actions

Recommended Posts

I wanna know how to create linedefs that once activated once, can't be used again. Although the "Repeateable Action" box is deactivated, the action still happens every time the player walks over it(It's a "Raise Floor to Neareast Floor" action on two linedefs connected)

Share this post


Link to post

Make sure it's an "S1" or "W1" action, you don't want a "SR" or "WR" action. 1 means one time use, R means repeatable. It sounds like you're mapping in another format but the concept should still apply, depending.

Share this post


Link to post

those options are not available in UDMF format, i remember it being only in "Doom Format". I think this option would be the "Repeatable action" box, but, as said before, it's deactivated.

Share this post


Link to post

If you've got the action on two linedefs, it will trigger once when the player walks over each linedef (i.e. twice). Either make only one line with the action, or write a script that only works once, and run it (linedef action 80) instead of triggering the line action, such as:

#include "zcommon.acs"

int i = 0;  //sets integer "i" to "0"

Script 1 (Void)

if (i == 0) //checks to see if "i" is "0".  won't do anything otherwise

{
i = 1; //changes integer "i" to "1" so that it won't run again
Floor_RaiseToNearest (....) //your action specials.

}
You can bring up the script editor by pressing F10. Hope this helps :)

Share this post


Link to post

Another way is to give a specific one Tag (aka Line ID) to all linedefs that you want to trigger the one-time-only action, and make them execute an ACS script that will both trigger the action and call SetLineSpecial that would nullify the action specials of all the tagged linedefs, so that they couldn't be triggered anymore.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×