Fall/Damage Slowdown

Please post any questions about developing your plugin here. Please use the search function before posting!
decompile
Senior Member
Posts: 416
Joined: Sat Oct 10, 2015 10:37 am
Location: Germany
Contact:

Fall/Damage Slowdown

Postby decompile » Fri Mar 24, 2017 2:03 am

Hey,

How can you actually prevent the fall/damage slowdown when you land from higher location?

Mappers do that with filter_damage_type and with a trigger which has "OnStartTouch" "!activator,SetDamageFilter,no_fall,0,-1".

Wondering if I can reproduce it with a plugin on spawn or somehow else.
decompile
Senior Member
Posts: 416
Joined: Sat Oct 10, 2015 10:37 am
Location: Germany
Contact:

Re: Fall/Damage Slowdown

Postby decompile » Fri Mar 24, 2017 5:59 am

Mhm, I found "m_flVelocityModifier", which is a multiplier applied to the players speed to slow them down when they take damage and "m_flStamina", which was added to an earlier version of cs to try and stop bunny hopping
decompile
Senior Member
Posts: 416
Joined: Sat Oct 10, 2015 10:37 am
Location: Germany
Contact:

Re: Fall/Damage Slowdown

Postby decompile » Thu Mar 30, 2017 10:09 am

How can I set those properties? Or do they need to be added to the entity data thing
User avatar
Ayuto
Project Leader
Posts: 2193
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: Fall/Damage Slowdown

Postby Ayuto » Thu Mar 30, 2017 10:34 am

You can use entity.set_property_float() to set these properties.
decompile
Senior Member
Posts: 416
Joined: Sat Oct 10, 2015 10:37 am
Location: Germany
Contact:

Re: Fall/Damage Slowdown

Postby decompile » Tue Apr 04, 2017 10:56 pm

Im getting

ValueError: Property "m_flVelocityModifier" not found for entity type "player"
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Re: Fall/Damage Slowdown

Postby satoon101 » Wed Apr 05, 2017 12:35 am

It looks like that property is located at CCSPlayer.cslocaldata.m_flVelocityModifier. So, you would need to use cslocaldata.m_flVelocityModifier to get/set the value.

* Edit: also, to get all properties for a specific entity, you can simply run the following:

Syntax: Select all

for x in entity.properties:
print(x)
Image
decompile
Senior Member
Posts: 416
Joined: Sat Oct 10, 2015 10:37 am
Location: Germany
Contact:

Re: Fall/Damage Slowdown

Postby decompile » Wed Apr 11, 2018 9:39 am

User avatar
Ayuto
Project Leader
Posts: 2193
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: Fall/Damage Slowdown

Postby Ayuto » Wed Apr 11, 2018 5:23 pm

I think you need to set it to the classname or targetname of a filter_damage_type entity.

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 37 guests