Ticrate changing

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
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.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
khoi24
Posts: 2
Joined: Sat Apr 26, 2025 8:31 am
Preferred Pronouns: He/Him
Operating System Version (Optional): win 10

Ticrate changing

Post by khoi24 »

Hi everyone! This is my first time I ask things around here so I may notknow much.

Is there a good way to change the ticrate of actors locally? I want to make a personal mod that change the firerate of weapons but not limited to the 35 tic/s of the doom engine.
User avatar
phantombeta
Posts: 2211
Joined: Thu May 02, 2013 1:27 am
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: Brazil

Re: Ticrate changing

Post by phantombeta »

Actors can't have different ticrates. The ticrate is engine-global, and actors tic when the whole engine tics.
khoi24
Posts: 2
Joined: Sat Apr 26, 2025 8:31 am
Preferred Pronouns: He/Him
Operating System Version (Optional): win 10

Re: Ticrate changing

Post by khoi24 »

So how does Doom CE manages to be able to change weapon speeds ? Just curious about it.
User avatar
Enjay
 
 
Posts: 27549
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Ticrate changing

Post by Enjay »

Ah, without looking at the mod, that's almost certainly done by changing frame durations - not ticrates.

e.g. if a weapon frame has a duration of 4, then it will be displayed for 4*1/35 of a second (i.e. 4 tics). If you change the duration of the frame to 1 (1 tic or 1/35 of a second), the ticrate has not changed, but the weapon frame is being shown for a much shorter period of time. i.e. the weapon will be faster.

So, the ticrate is not being changed (it's still 35 tics per second) but you are showing the weapon from for fewer tics.
Post Reply

Return to “Scripting”