Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Peaved T-40

How do I set a walk over line def to only trigger once?

Recommended Posts

I have a line def that lowers a floor when you walk over it. but every time you cross it, the floor gets lower and lower. how do I make it only do it once?

Share this post


Link to post

Depends on format.

 

In Doom/Boom etc, use a W1 instead of WR (Walk over 1 time/ Walk over Repeatable)

 

In Hexen/UDMF, untick "Repeatable action".

Share this post


Link to post
17 minutes ago, Dragonfly said:

In Hexen/UDMF, untick "Repeatable action".

 

I'm in UDMF and it's unticked by default for me. I ticked it, hit ok, then unticked it again, doesn't seem to matter

Share this post


Link to post

When Repeatable Action in not ticked, as in

 

Spoiler

YBvHHix.png

 

and the action repeats when walking over the linedef, then there is something terribly wrong with your editor installation.

Share this post


Link to post
3 minutes ago, Kappes Buur said:

When Repeatable Action in not ticked, as in

 

  Hide contents

YBvHHix.png

 

and the action repeats when walking over the linedef, then there is something terribly wrong with your editor installation.

 

Actually i found my problem here. I have four line defs in a square that all do the same thing so it activates no matter where the player enters from. So each individual line def will trigger only once but there are four of them so it'll trigger up to four times total. I have no idea how to fix this

Share this post


Link to post

You did not mention which UDMF port you use.

With GZDoom you can make a script to change the action by setting a new condition when the first linedef is crossed.

 

Quote

#include "zcommon.acs"

 

// set a condition    

int door = 0;

 

script 1 (void)
{    
    while ( door == 0 )
    {

// do stuff

    Plat_DownByValue (2, 2, 17, 1);
    Tagwait (2);
    Plat_DownByValue (3, 2, 17, 1);
    Tagwait (3);
    Plat_DownByValue (4, 2, 17, 1);
    Tagwait (4);
    Plat_DownByValue (5, 2, 17, 1);
    Door_Open (1, 4);


// now increment door to prevent another activation
    door = door + 1 ; 
    }
}

 

 

Edited by Kappes Buur

Share this post


Link to post
10 hours ago, Peaved T-40 said:

I have four line defs in a square that all do the same thing so it activates no matter where the player enters from.

You could also use one of the sector action things like Actor enters sector or Actor hits floor, since they can be set to Activate once only. You can find them in the Things menu under Sector Actions category.

Share this post


Link to post
On 1/23/2024 at 6:55 PM, Peaved T-40 said:

 

Actually i found my problem here. I have four line defs in a square that all do the same thing so it activates no matter where the player enters from. So each individual line def will trigger only once but there are four of them so it'll trigger up to four times total. I have no idea how to fix this

 

perhaps use can use a limiter? for example, "w1 floor lower to [lowest floor]" where the lowest floor is the limiter. the [lowest floor] is set either by making a small 1x1 map units sector that is inside/beside the sector you want to lower, or a sector next to the control sector joined to the sector you want to lower. so even if all four linedefs are activated, the floor would only lower to the [lowest floor]. hope this helps :)

Share this post


Link to post
On 1/25/2024 at 8:49 AM, rita remton said:

 

perhaps use can use a limiter? for example, "w1 floor lower to [lowest floor]" where the lowest floor is the limiter. the [lowest floor] is set either by making a small 1x1 map units sector that is inside/beside the sector you want to lower, or a sector next to the control sector joined to the sector you want to lower. so even if all four linedefs are activated, the floor would only lower to the [lowest floor]. hope this helps :)

 

There are complications in my build that makes this difficult but it's a good idea. I think I'd rather do this instead of scripting if I can. We'll see

Share this post


Link to post
On 1/24/2024 at 12:52 AM, Aurelius said:

You could also use one of the sector action things like Actor enters sector or Actor hits floor, since they can be set to Activate once only. You can find them in the Things menu under Sector Actions category.

 

This is cool, I didn't know that was a thing. I'll have to play with it but same problem as with Rita Remton's suggestion. I have a complex map and need multiple sectors to move at once. I'll have to play with those things though

Share this post


Link to post
4 hours ago, Peaved T-40 said:

 

This is cool, I didn't know that was a thing. I'll have to play with it but same problem as with Rita Remton's suggestion. I have a complex map and need multiple sectors to move at once. I'll have to play with those things though

 

i just remembered: since it is [udmf], you have a better option: [line action 37: floor move to value] where you could specify the exact height the floor needs to be moved to. good luck :)

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
×