Knockback

EQ2Emulator Development forum.

Moderator: Team Members

Post Reply
Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Knockback

Post by Jabantiz » Mon Dec 02, 2013 3:58 pm

Documenting this here so others will know how to use it, will be put into a lua command to be used in any type of script soon.

Here is the struct I came up with for OP_PerformPlayerKnockbackMsg
<Struct Name="WS_PlayerKnockback" ClientVersion="1" OpcodeName="OP_PerformPlayerKnockbackMsg">
<Data ElementName="target_x" Type="float" />
<Data ElementName="target_y" Type="float" />
<Data ElementName="target_z" Type="float" />
<Data ElementName="vertical_movement" Type="float" />
<Data ElementName="horizontal_movement" Type="float" />
<Data ElementName="unknown" Type="int8" />
<Data ElementName="use_player_heading" Type="int8" />
<Data ElementName="unknown2" Type="int8" Size="4" />
</Struct>
Setting horizontal movement to a positive value will push the player away from the target location, negative value will push the player towards the target location.

Vertical movement needs a negative value when being pushed away from the target and a positive value when being pushed towards the target, however a rather large negative value will actually make the player move towards the target location, haven't figured out the value where it changes direction though.

Setting use_player_heading to 1 will ignore the target location and push back or forward based on the players heading.

A decent size knockback would be vertical = -45 horizontal = 25, while a minor one would be vertical = -8 horizontal = 15

User avatar
thefoof
Retired
Posts: 630
Joined: Wed Nov 07, 2012 7:36 pm
Location: Florida

Re: Knockback

Post by thefoof » Mon Dec 02, 2013 6:58 pm

Very cool :mrgreen:

User avatar
alfa
Team Member
Posts: 550
Joined: Fri Jul 27, 2007 6:24 pm
Location: France
Contact:

Re: Knockback

Post by alfa » Thu Dec 05, 2013 2:50 pm

Nice Jab :)
Fight with me... Or die, like the rest.
J.A. say: "I think Xinux tried to tell me this, but I ignore most things he suggests."

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest