Hello, welcome to this pointless thread in which I will ask about things I don't really understand, despite reading the wiki. This may probably actually fit better into the Scripting section of this page, but I assume I have to do this all via some kind of wizardry with linedefs or something, so I guess I'll put it here for now?
I am working on a map, and there are specific things I want to happen when a player enters a room, and interacts with the object in said room.
Think Metroid save rooms, map rooms, etc.
When the player enters, the music track changes to reflect that they are now in a safe zone. When they leave, the music reverts back to the default level music.
When the player interacts with the object within the room, they can Save, refill their health & armor, or refill their ammo.
The music and saving are my primary issues, as I believe that I can just have the object give players an item which will restore health/armor/ammo.
Thanks for any assistance (PS, why is "How Do I...?" locked? Being curious.)
Mapping (Maybe Scripting?) Questions
Moderator: GZDoom Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
- Devianteist
- Posts: 945
- Joined: Wed Sep 24, 2014 4:07 pm
- Location: Creating a SPACE HULK conversion!
- Contact:
-
- Posts: 4949
- Joined: Sun Nov 14, 2010 12:59 am
Re: Mapping (Maybe Scripting?) Questions
For the music bit, there's [wiki]SetMusic[/wiki]. For the saving bit, you can do [wiki=Autosave]autosaves[/wiki].
viewtopic.php?f=48&t=58506(PS, why is "How Do I...?" locked? Being curious.)
- Devianteist
- Posts: 945
- Joined: Wed Sep 24, 2014 4:07 pm
- Location: Creating a SPACE HULK conversion!
- Contact:
Re: Mapping (Maybe Scripting?) Questions
That's fair.Blue Shadow wrote:For the music bit, there's [wiki]SetMusic[/wiki]. For the saving bit, you can do [wiki=Autosave]autosaves[/wiki].
viewtopic.phpf=48&t=58506(PS, why is "How Do I...?" locked? Being curious.)
As for SetMusic, this looks pretty goofy, then again, I've only just started messing with values like this.
Is there any way to explain this a little more, or perhaps provide an example of it working? I realize it's probably more simple than I realize, but anyone who's spoken to me knows I'm a dunce.
-
- Posts: 4949
- Joined: Sun Nov 14, 2010 12:59 am
Re: Mapping (Maybe Scripting?) Questions
Here's a demo. Load it with Doom 2 on MAP01. Open the door and enter. The music should change to the intermission screen music. Exit the room and the music should change back to the map's default.
The demo makes use of [wiki=Classes:SecActEnter]Actor Enters Sector[/wiki] and [wiki=Classes:SecActExit]Actor Leaves Sector[/wiki] things to achieve the music toggling.
The demo makes use of [wiki=Classes:SecActEnter]Actor Enters Sector[/wiki] and [wiki=Classes:SecActExit]Actor Leaves Sector[/wiki] things to achieve the music toggling.
- Devianteist
- Posts: 945
- Joined: Wed Sep 24, 2014 4:07 pm
- Location: Creating a SPACE HULK conversion!
- Contact:
Re: Mapping (Maybe Scripting?) Questions
Thank you! This should be extremely useful in helping me learn how to do this!Blue Shadow wrote:Here's a demo. Load it with Doom 2 on MAP01. Open the door and enter. The music should change to the intermission screen music. Exit the room and the music should change back to the map's default.
The demo makes use of [wiki=Classes:SecActEnter]Actor Enters Sector[/wiki] and [wiki=Classes:SecActExit]Actor Leaves Sector[/wiki] things to achieve the music toggling.