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

How to lower walking/running speed of player? [Zdoom]

Recommended Posts

Hello. I am building my second mod for zdoom Doom 2 game and i need some help with scripts because i dont understand how to type the scripts.
I want in my maps, the player to walk and run slower than default. Can someone write the exact script so i can copy and paste it to the mod? Also i have another thing i would like to do. When the first map has opened after i start the game i want to have a black screen with a text written in the middle and at the same time a voice from audio file to speak and say the things that the text contains. When he finishes speaking and the text is all complete then i want a FADE IN effect for the map to begin playing the game!
Can someone please give me the scripts for these to work? If i only knew how to program...

Share this post


Link to post

See this and this.

DECORATE:

Actor MyPlayer : DoomPlayer
{
    Player.ForwardMove 0.8
    Player.SideMove 0.8
}

ZMAPINFO:
GameInfo
{
    PlayerClasses = "MyPlayer"
}
This'll give you a player that moves at 80% of the normal player's speed.

Share this post


Link to post

I created a text, named it DECORATE.txt, put the code exactly as you wrote it, just changed the 0.8 to 0.5 then imported it to my wad with Slade and when i ran the game there was no change in the speed of my player.
Did i do something wrong?

Share this post


Link to post

If you want to replace the player class, you also need to do the MAPINFO thing.

Share this post


Link to post

I dont want to do that, i only want to lower the walking/running speed of the player. Did i do the right steps to create and import a DECORATE file? Maybe there is a mistake?

Share this post


Link to post

You have to do both steps. The DECORATE part creates a new player class with slower movement, and the ZMAPINFO part tells the game you want to use this new player class.

Share this post


Link to post

Ok. I tried to make a ZMAPINFO with the XWE program. I put the code as it is written here. I changed the value to 0.1 and tried the game. Again no change in the speed of the player. Do i need to do more things for this to work?
For my game config in doom builder 2 i use zdoom (doom in hexen format). Maybe there is a problem?

Share this post


Link to post

Maybe you also need to change the run speed, too.

DECORATE:

Actor MyPlayer : DoomPlayer
{
    Player.ForwardMove 0.8, 08
    Player.SideMove 0.8, 0.8
}

Share this post


Link to post

I just changed the run speed too and i tried. Again no difference in speed. Are you sure this is how it is writen? Have anyone else tried to lower the speed and was he succesfull?

Share this post


Link to post

There's a typo (missing period) in Gez's last example, but otherwise everything works. Here is a wad following his steps and copypasting his code snippets, changing all speed values to 0.5 so the effect would be easier to see, ran it in GZDoom 1.6.0, it works fine (player speed is halved).

Share this post


Link to post

I tested the wad you linked and in zdoom it does not work but it works in Gzdoom. So am i suppose to make the mod for Gzdoom and not for Zdoom?

Share this post


Link to post

It should work just as well in ZDoom as in GZDoom. I just grabbed the latest official ZDoom release (2.6.1) from here, installed it from scratch and ran the wad, it works fine.

Share this post


Link to post

Ok, i guess then that was the mistake i was fearing i might do. Zdoom i use is 2.5.0, an old one! Now i have another question. Is it possible to have on some maps the speed of the player in default values and in other maps to have it lower?
For example, i want to have the speed lower in my MAP01 but in my MAP02 the speed i want to be in default. How can i do this? I think i will have to use the script editor in Doom Builder, but i dont know what to type in there...

Share this post


Link to post

You'd forgo the above then, and just use SetActorProperty with APROP_Speed. I think. Here is one way to do it.

Edit: btw, this is using "ZDoom (Doom in UDMF)" format. I don't know if it would work in Doom in Hexen as well, but as far as I understand there is no point in using that format anymore.

Share this post


Link to post

I tried this example in my wad and it works even in (doom in hexen format)! Thank you very much my friend, you are awesome. Did you make these examples? I would like to have more examples if there is a collection of examples somewhere.

May i ask some more things? Is it possible to make a map have only 1 or 2 colors in general? Like when you take some powerups in the original game and everything has one color until the powerup ends. But to have this standard from the beginning of the map without using powerups.

Share this post


Link to post

There's probably example wads floating around. I don't know of any central repository. Searching the ZDoom editing forum for any particular problem you're having does the trick for me, people tend to be pretty helpful and knowledgeable. Most ZDoom wiki articles also come with code examples.

Colored lightning is simple in UDMF format: you edit a sector, pick the "Custom" tab, scroll down to the "lightcolor" line, click on the colored globe on the right and select your color. If you want an entire map to have this lightning, you would just select every sector at once and do the same as above.

It seems harder to do in "Doom in Hexen". You'd want to run a script at map start to color every sector with Sector_SetColor, which means you'd have to make sure you got every tag in there (or you could play it safe and just copypaste the line for a wide range of tags, but that seems kind of clunky).

Another way to do it in "Doom in Hexen" could be to create an invisible powerup that lasts very long in DECORATE, and give it to the player at map start through GiveInventory. The color is a little different using the exact same value, though.

Examples of those three ways. I'd recommend you go with the UDMF one, it's by far the easiest to setup and the easiest to adjust (much easier to just click on the color you want than look up a RGB table to get the exact value). You don't lose anything by going UDMF, as far as I know. The format works in ZDoom, and you have all the "Doom in Hexen" features and more, and those features tend to be easier to use in UDMF.

There might be better ways to do this, as to tell you the truth, I didn't know how to do any of that stuff specifically before looking it up just now. The ZDoom wiki is a pretty good source of information, and when it's too hard to understand right away, googling around or checking the ZDoom forums can help you out.

Share this post


Link to post

How can i make the maps to be made with doom in udmf format? I started making them with hexen format, i went to map options in doom builder and changed from there to udmf but when i ran the game it crashed because it said there were no vertices!

I then clicked all the vertices in my map and at last it ran the game but where 2 sectors are one next to each other united there it has the missing texture side effect. How can i fix that problem?

Share this post


Link to post
axtarmas said:

How can i make the maps to be made with doom in udmf format? I started making them with hexen format, i went to map options in doom builder and changed from there to udmf but when i ran the game it crashed because it said there were no vertices!

I then clicked all the vertices in my map and at last it ran the game but where 2 sectors are one next to each other united there it has the missing texture side effect. How can i fix that problem?


Ok, i found a solution myself in this one! I chose Linedefs from the menu of doom builder, i dragged the mouse and cought all linedefs of my map then i pressed COPY. Then i a created a new map, chose doom in udmf formatand paste what i copied. Then saved the map into the wad i am creating and that was it!

Share this post


Link to post

I'm very sorry to bump this extremely old thread, but the info for this kind of thing is extremely limited and keeps leading back to this thread anyways. Is there anyway someone could upload the run speed example wad posted earlier in this thread Phml? The link is dead and it's the only one of it's kind that I can find. If not, I'll manage. It would just be extremely useful for my project as I'm aiming for more realistic movement speeds.

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
×