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

Crossing line => open script?

Recommended Posts

Whats the function to activate a script in acs if a player crosses a line.
Example:
Player walks over line 1, script 1 is acitvated.

How to do this?
Cant find on zdoom

Share this post


Link to post

A clarification: an OPEN script is run when a map is started for the first time and serves to activate one or more script specials. No action on the part of the player is required to begin an OPEN script (i.e., no linedef needs to be crossed).

What you're asking for is an "action special" script, which will take the following general form:

#include "zcommon.acs"

script 100 (void)
{
Floor_LowerByValue (tag, speed, height);
}

You will need to assign the ACS special to the linedef that the player needs to cross to activate the script. Flag it "repeatable" if you want the script to be activated each time the player crosses the line.

Share this post


Link to post

You can also use ENTER instead of OPEN or (void), it means the every time a player enters or respawn in the map this script activated.

Share this post


Link to post
C30N9 said:

You can also use ENTER instead of OPEN or (void), it means the every time a player enters or respawn in the map this script activated.

Actually, ENTER scripts will only run the first time any given player enters or respawns in a map. However, ENTER scripts will run for each player that enters or respawns in a map, while OPEN scripts will only run the first time any player enters the map. For single player mode, the two types of scripts work the same way; for multiplayer maps, ENTER scripts will run once for each time a player enters the map while OPEN scripts will run only once - when any player has first entered the map.

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
×