Jump to content
  • 0

How do you add animations for a weapon that only play when the player is moving?


Player T

Question

So first off, I made this custom weapon in Zscript and I want the player to get some feedback while they use it, along with all the other weapons in the mod. But I'm having trouble with 1 thing, I want the weapon to play an animation while the player is Walking, but I can't figure out how to make the gun change states or simply sprites when the player moves. I also want there to be two animations for Walking and Sprinting. The walking animation will only offset the weapon a little bit, kind of like the regular view bob, but different. And for sprinting, it will simply change the weapon sprites. So how exactly do I get the player's input? I've tried the GetPlayerInput (https://zdoom.org/wiki/GetPlayerInput) but I didn't get anywhere with it ¯\_(ツ)_/¯

 

slade.png.42f72338c3e3437922e9f555f581145c.png

Share this post


Link to post

1 answer to this question

Recommended Posts

  • 0

Thats a fairly advanced mechanic unfortunately. The Linked page you show is specifically for ACS. THe way may want to build it is similar to what you are already doing in the form of ZSCRIPT. The mechanics to buiild your goal would be similar to the ACS method. To put it simply, ZSCRIPT is a language developed for GZDoom that has both the powers of DECORATE and ACS making it pretty neat in that aspect. 

 

As far as actually building such a script in ACS or ZSCRIPT, I personally have little to no capability. The syntax and "vocabulary" used in ZSC for building non-actor events is greek to me despite working around it for years.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...