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

script to run at level start?

Recommended Posts

I have some events in my maps I'd like to run continuously from the instant the level starts.
The first two that come to mind are lifts that are continuously in motion and textures that I want to slide around (to create the flow of lava or water)

I think these can be scripted in doom builder easily enough...in fact I think i've already done it, I just don't know how to get them to kick off at level start.

What do I do?

Share this post


Link to post

Make it either an ENTER script or an OPEN script, depending whether you want the player to be the script activator or not. In the former case, separate instances of the script will run for each player joining a multiplayer game.

http://zdoom.org/wiki/Script_types

Share this post


Link to post

Thanks for the help, as always scifista42.

I want it to be like...the "worldspawn" entity in quake 3, if that helps explain what I'm getting at. It should be something the world just innately does with or without the player doing anything. *digs around in script types*

Share this post


Link to post

Huh, so I didn't understand this as much as I thought.

I see I need an OPEN script, but I'm not sure how to get from that to...making a crusher work non-stop in my map.

Figuring this was a common enough thing to want, I tried to see if someone else had a script floating around that I could use but I couldn't find one.

What I'm hoping to accomplish is to have a sector who's floor goes all the way up and all the way down cyclically. I thought I could use crusher code, but I found crushers work the other way around - the ceiling moves around, not the floor.

Share this post


Link to post

There's always Floor_RaiseAndCrush, but since the floor will not lower by itself, you'll have to simulate that. Something like this should work:

Floor_RaiseAndCrush(666, 8, 10);
TagWait(666);
Floor_LowerToNearest(666, 8);
TagWait(666);
restart;
Replace 666 by the relevant sector tag. And instead of LowerToNearest, it might be more appropriate to use LowerToLowest or LowerByValue.

Share this post


Link to post

Consider changing your mind and using a ceiling crusher instead of floor crusher anyway, because players are accustomed to ceiling crushers + the engine supports them natively as a single action.

Share this post


Link to post
scifista42 said:

Consider changing your mind and using a ceiling crusher instead of floor crusher anyway, because players are accustomed to ceiling crushers

This is no problem (and no bad surprise) if the player sees the floor cycling up and down before entering it. Take it like a new feature missing from vanilla Doom and Boom.

Share this post


Link to post

I should add these will be used first as decoration, and will be set up in such a way that the player can't hurt themselves. Later in the level/game, they'll be used again with the safety off.

@Gez -

Thanks for the code, I'll give that a try today.

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
×