Jump to content

Recommended Posts

Posted

hi,

So i'm making meth in my mod, but i don't want to make it a potion or a food, but still have an animation when you consume it for it to give you potion effects. The reason for this is because i want the potion animation, but the potion class extension makes it a water bottle or something weird.

 

Right now, the only method i found was to consume it the moment the player right clicks, but i want some animation between the right click and the consumation (if that's a word).

 

this is what i have:

 

 

  Reveal hidden contents

 

 

 

Also, can you link me to a tutorial on how to add sounds?

 

thanks,

Pandassaurus

Posted

Thanks, that seemed to help a bit. Now, i right click and it does the animation, but after those 32 ticks of the maxitemduration, it stops and does nothing, and i don't know why.

 

here's the code:

 

 

  Reveal hidden contents

 

 

thanks a lot, and i will check out the sound tutorial now as well.

-Pandassaurus

Posted

Ok, so i defined it as so:

 

 

  Reveal hidden contents

 

 

but onPlayerStoppedUsing just looks for the use button to be released, and doesn't take into account the maxUseDuration. Is there another function that does so, or am i missing something?

 

thanks a lot,

-Pandassaurus

Posted

Yes thanks that worked out great.

 

For anyone who wanted to know what it looked like at the end:

 

  Reveal hidden contents

 

 

thanks to everyone who helped!

-Pandassaurus

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   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.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.