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

Linedef activates multiple actions

Recommended Posts

Hey

For ZDoom/ UDMF mapping, I'd like to know how to assign multiple actions to a linedef.

I suppose it's done by setting the linedef action to 80 Script Execute, but I'm just not in the know of how to make up that script.

For instance, on one linedef, I'd like to combine four 200 Floor Generic Change actions, and one 130 Thing Activate.

Share this post


Link to post

Without using scripts, you could do a few things, but one way to do it would be to put some monsters or barrels etc. outside the map, give them all the same thing tag, give each one a different thing action for your "floor generic change" and "thing activate" stuff, and then for your one linedef make it destroy the things outside the map (the thing actions activate upon their death).

Share this post


Link to post

You make a void script, like this:

Script "example script" (void)
{
      Generic_Floor(tag1, speed1, height1, target1, flags1);
      Generic_Floor(tag2, speed2, height2, target2, flags2);
      Generic_Floor(tag3, speed3, height3, target3, flags3);
      Generic_Floor(tag4, speed4, height4, target4, flags4);
      Thing_Activate (tid);
}
Replace the parameter names by appropriate values. Compile and save the script. Now take your linedef, and set it to action special 80, using script name "example script". Don't forget to set some activation flags so that the linedef can be activated by the player.

Share this post


Link to post

Also, you'll need to write: #include "zcommon.acs",at the top of your scripts window (shortcut F10) to get UDMF to work.

Welcome to ACS. :-)

Share this post


Link to post

Maybe the laziest way is to simply put a bunch of linedefs very close to each other. It's possible with switches too: just use the passthru flag so that the press activates all lines. I just did this in the Boom map I was making because I didn't feel like setting up the voodoo dool scroller stuff.

Share this post


Link to post
Memfis said:

Maybe the laziest way is to simply put a bunch of linedefs very close to each other.


Yep, that's the old fashioned way. But it's so ghetto, in this day and age :)

schwerpunk said:

Welcome to ACS. :-)


Thanks! :)

@TOD: I'm mapping for ZDoom so fortunately I don't need to tinker with all of that anymore :p :)


Gez said:

You make a void script, like this:

Script "example script" (void)
{
      Generic_Floor(tag1, speed1, height1, target1, flags1);
      Generic_Floor(tag2, speed2, height2, target2, flags2);
      Generic_Floor(tag3, speed3, height3, target3, flags3);
      Generic_Floor(tag4, speed4, height4, target4, flags4);
      Thing_Activate (tid);
}
Replace the parameter names by appropriate values. Compile and save the script. Now take your linedef, and set it to action special 80, using script name "example script". Don't forget to set some activation flags so that the linedef can be activated by the player.


Thanks. :))

How do you know or find the ACS-specific names of the linedef actions?

Floor Generic Change turned to Generic_Floor, I mean.

Share this post


Link to post
gemini09 said:

How do you know or find the ACS-specific names of the linedef actions?

Floor Generic Change turned to Generic_Floor, I mean.


They're all listed here: http://zdoom.org/wiki/Action_specials

Also, they technically aren't ACS-specific names. You can use them also in map translators, DECORATE code, and even FraggleScript. ACS-specific functions are listed here.

Share this post


Link to post

The method I posted does require zdoom. The downside of using scripts is that when you hover over the line in an editor, it doesn't show the sectors/things it activates, so you have to scroll through the scripts lump and search for sector/thing tags which is annoying.

Share this post


Link to post
TimeOfDeath said:

The method I posted does require zdoom. The downside of using scripts is that when you hover over the line in an editor, it doesn't show the sectors/things it activates, so you have to scroll through the scripts lump and search for sector/thing tags which is annoying.


This is slightly mitigated by using named scripts rather than numbered scripts. IIRC those are shown in the details panel in GZDB.

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  
×