Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
40oz

Linedef Action 53 - Floor Start Moving Up and Down

Recommended Posts

Is there any way to control this action? I was hoping to create some kind of jumping puzzle with it so I created a test map, but it seems every time I cross the line that starts the action, the floors have different behavior every time i run the map. Some times the floors start moving down immediately, others it waits a second, then starts. Is there anything I can do about that or is that just the way the game works?

I'm using boom format btw

Share this post


Link to post

The initial direction in which to move is chosen randomly when the line is activated; unfortunately there is no way to control it as far as I am aware.

Share this post


Link to post

      case perpetualRaise:
        plat->speed = PLATSPEED;
        plat->low = P_FindLowestFloorSurrounding(sec);

        if (plat->low > sec->floorheight)
          plat->low = sec->floorheight;

        plat->high = P_FindHighestFloorSurrounding(sec);

        if (plat->high < sec->floorheight)
          plat->high = sec->floorheight;

        plat->wait = 35*PLATWAIT;
        plat->status = P_Random(pr_plats)&1;

        S_StartSound((mobj_t *)&sec->soundorg,sfx_pstart);
        break;
The relevant line being "plat->status = P_Random(pr_plats)&1;", which means that it is indeed completely random.

Share this post


Link to post

Could even step outside your comfort zone and learn a little ACS to make the process easier :)

Share this post


Link to post

which means that it is indeed completely random.

Completely random? Does it mean that it can be used for some voodoo engineering of randomness?

Share this post


Link to post
printz said:

Completely random? Does it mean that it can be used for some voodoo engineering of randomness?

I guess you might be able to do something with looping walkover triggers to start and stop them to make them pick a random direction again, but I'm not sure how usable such slow movement would be for voodoo doll logic.

Share this post


Link to post
printz said:

Completely random? Does it mean that it can be used for some voodoo engineering of randomness?

Yes. Check out grid32.wad map04: there is 4 red keys but only one is accessible, and it might be any of them.

Share this post


Link to post

I recall in another something about there really only being 255 intervals internally for said random calculations correct? Does this apply here too?

Also re: random and voodoo dolls. Search for a thread by Earthquake regarding random teleports. He ended up with a really good example I thought. The same logic can be applied to do other things such as (seemingly) random linedef actions or to place items in different locations in a map with each play-though*

*may incite violence from fellow doomers.

Share this post


Link to post

or to place items in different locations in a map with each play-though*


Hmm, you know, done with caution that could be pretty interesting. I could see slightly moving weapon/ammo/health position, or even a select few monsters, making each playthrough a bit different. Thanks.

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
Sign in to follow this  
×