Jump to content

One-Time Only Actions


ranhcase

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...