Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
baja blast rd.

*** The "ask a miscellaneous editing question" thread ***

Recommended Posts

Yes it seems that I forgot to use Weapons prefex within SNDINFO. Another weapon from realm667 didn't have it so I was using that as a cheat sheet. As expected, that weapon is also broken.

Share this post


Link to post

Prefix is not what's needed. Logical name is what's needed. For example, "DSXXXX" is a sound lump. But when you put this code to SNDINFO:

DSXXXX DSXXXX
Then "DSXXXX" also becomes the logical name of the "DSXXXX" lump, because that's how sound assignment works. And from that point on, you can pass "DSXXXX" as an argument to commands such as $volume that only accept logical names as arguments but not lump names.

The logical name may be completely arbitrary. Whether it has a prefix or not, whether it is the same as the sound lump name or not, it's irrelevant. It might have as well been:
abc/def/xyz DSXXXX
And then you'd have "abc/def/xyz" logically representing the "DSXXXX" sound, and you'd have to use "abc/def/xyz" to refer to it when using $volume etc.

Share this post


Link to post

A little technical ZDoom-mapping question;

I have this elevator:

Spoiler

It moves between 3 floors.

It's been a while, but it's done by "80 - Script execute" on the three separate switches, and this is the script:
Spoiler

Script 16 (void)
{
Floor_LowerByValue(14, 8, 96);
}

Script 17 (void)
{
Floor_RaiseByValue(203, 32, 444);
}

Script 18 (void)
{
Floor_LowerByValue(203, 32, 256);
}

Script 19 (void)
{
Floor_LowerByValue(203, 32, 188);
}

I'm attempting to wrap this thing up, and during testing I've found it easy to break the elevator, and make the floor go some script-related value up or down, in a wrong direction.

So I'm wondering if anyone has a better method of making an elevator. I suspect mine wasn't very elegant.

Thanks a lot in advance.

Share this post


Link to post

Declare a map scope variable holding a value referring to the current floor where the lift is, for example 1 = first floor, 2 = second floor, 3 = third floor. Make a single script that takes one argument, which you pass as arg1 on each particular switch, the value uniquely identifying the switch, for example 1 = first switch up to 4 = fourth switch. In the script, define an "if/else" based logic that evaluates both the lift's current floor and the switch which was just pressed (according to the map scope variable and the script argument) and determines in which direction and how much is the lift supposed to move.

Share this post


Link to post

Or you could just use the elevator line type and make some dummy sectors to control the stopping points for each floor. It's a little less complicated, but it requires that you have two buttons instead of one. Plus side is you can put the buttons on the elevator and have them move with the elevator instead of being in the walls.

Share this post


Link to post

Hello,

In my level, I have a switch that requires a red key in which I want to use to open a door and spawn in ambush enemies at the same time. I have a problem that the switch in game is spammable (it switches states and plays sound, doesn't open door) without the red key. How do I make it so the switch won't change or play sound in game unless you have the red key?

script 3 (void)
{
  If (CheckInventory("RedCard")){
	Door_Open(19,64,19);
        Thing_SpawnFacing(22,T_SHOTGUY,false,0);
	Thing_SpawnFacing(23,T_IMP,false,0);
	}
    
  Else
  {
    Print(s:"You need a red keycard to activate this switch!");
	
  }
}
Thanks in advance.

Share this post


Link to post

If it's possible to change a wall texture via a script or linedef action, what you can try is:

1) Copy the switch texture (SW1WATEV) in SLADE and make it a new texture (SW_WATEV), which will be the initial texturing of the wall when it's nonfunctional.
2) Add that texture to your textures lump but make sure it's just a regular wall texture, not a switch with a counterpart defined in wherever switches are defined in (G)ZDoom.
3) Have a walkover trigger where the RK is acquired change SW_WATEV to SW1WATEV. Now it will be an animated switch.

You can see if this would work by trying with a random non-switch texture instead of SW_WATEV before going through the hassle of changing things in SLADE.

Share this post


Link to post

The correct approach is to make the activation of the script itself to be locked, either by applying a lock to the linedef with ACS_Execute, or by using ACS_LockedExecute. Then the script won't need to contain any arbitrary keycard checking and message displaying (only the sequence of actions intended to be performed when the player has the keycard), and the linedef will automatically appear colored on the automap accordingly to the lock color.

Share this post


Link to post
scifista42 said:

The correct approach is to make the activation of the script itself to be locked, either by applying a lock to the linedef with ACS_Execute, or by using ACS_LockedExecute. Then the script won't need to contain any arbitrary keycard checking and message displaying (only the sequence of actions intended to be performed when the player has the keycard), and the linedef will automatically appear colored on the automap accordingly to the lock color.


That allowed me to do what I wanted to do. Thank you.

Share this post


Link to post
Rayzik said:

Or you could just use the elevator line type and make some dummy sectors to control the stopping points for each floor. It's a little less complicated, but it requires that you have two buttons instead of one. Plus side is you can put the buttons on the elevator and have them move with the elevator instead of being in the walls.


Can you recall a map that uses this effect so I can use it for reference?

Share this post


Link to post

I don't know any map for reference, but the wiki descriptions of each elevator related functions should be understandable enough, and the general idea is to use:

http://zdoom.org/wiki/Elevator_LowerToNearest for the "Down" button inside the elevator.
http://zdoom.org/wiki/Elevator_RaiseToNearest for the "Up" button inside the elevator.
http://zdoom.org/wiki/Elevator_MoveToFloor for the "Call" button placed at each floor outside the elevator.

Share this post


Link to post

I'd still prefer a reference map because there are some things I'm unsure about, so if anyone can think of any then please feel free to let me know.

Nevermind, I think I'll find something in another thread asking for advanced ZDoom maps :-)

Share this post


Link to post
NeedHealth said:

What are the ways to detect if a map is played in no monsters mode?


Simple, if monsters aren't present, then it's in no-monster mode.


For ZDoom there's a script function you can use: GetCVAR ("sv_nomonsters") will return true if nomonster is on, false if off.

With only vanilla or Boom features it's harder. What you can do is have a monster that sees the player at startup, and will therefore start the level moving, who crosses a linedef that can be activated by walking monsters and this in turn does stuff on the map. Probably easier with Boom feature since you can make that monster open a door for a voodoo doll on conveyor belt setup and then get actions going that can only be run by a crossing player. The point here is that the map would, by default, be in the "nomonster" configuration and the startup monster would be responsible for setting things up for a "with monster" run.

Share this post


Link to post

You can also enforce a HUD Size via SetHudSize, which makes HudMessages display as if the screen resolution was that which you specified. For example, to make things larger try setting the HUD Size to 640x480, or 800x600.

Share this post


Link to post

Anyone got a list of which linedef actions are limited by sector heights in vanilla? Some moving floors/ceilings won't work if they're above or below a certain value, I think -512 to 1024. I know this info is out there somewhere but I'm not having luck with searching.

Share this post


Link to post

By looking into the source code, it seem to be just these: (regardless of activation type)

-Floor Start Moving Up and Down
-Floor Lower to Highest Floor
-Floor Lower to 8 Above Highest Floor

Also, the lower limit is -500 map units, and I didn't find any upper limit existing.

Share this post


Link to post

Thanks. I thought there were some ceiling actions too but I could have been wrong.

Share this post


Link to post

You were right, Ceiling Raise to Highest Ceiling seems to be affected by its own lower height limit for its highest neighboring ceiling, this limit is 0 map units.

Share this post


Link to post

I am using a custom palette and a colormap. But when a palette change happens, like being damaged or picking up an item, then the screen is garbled. How do I fix it, what have I done wrong?

I mean I understand why every graphic except the ones I am adding is garbled because they are for the default palette and I have changed it. But what about the garbled palette changes?

Share this post


Link to post

In SLADE3, right-click the palette and choose "Palette -> Generate Palettes -> Doom (14 palettes)".

Share this post


Link to post
VGA said:

I am using a custom palette and a colormap. But when a palette change happens, like being damaged or picking up an item, then the screen is garbled. How do I fix it, what have I done wrong?

I mean I understand why every graphic except the ones I am adding is garbled because they are for the default palette and I have changed it. But what about the garbled palette changes?

Have you generated the 13 other palettes from the first? SLADE3 can do that for you. Select your PLAYPAL, then Palette->Generate Palettes.

Share this post


Link to post

Ha, thanks guys!

SLADE to the rescue!

EDIT: Hey, it generates colormap, too!

Share this post


Link to post

I have a question!

Is it possible to remove the "Save Game" option from the main menu, and is it also possible to disable the quicksave button?

The source port intended would be GZDoom.

Thanks in advance.

Share this post


Link to post

That's a shame, would have liked that retro feel you have in games from the PSX era of gaming with save points.

Thanks for the link to the MENUDEF page though, that will inevitably come in handy regardless!

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
×