Hi guys. I wanna make a swep. I want to add two or more animations on one button - "shoot". These animations will play randomly. One click ("shoot") = one random animation. What do I do?
$sequence "shoot" {
"path\shoot.smd"
activity "ACT_VM_PRIMARYATTACK" 1
fadein 0.2
fadeout 0.2
snap
fps 30
}
P.S. Don't be a crashing bore.Don't put your stupid icons like ''Bad Spelling''. Ok?! English is not my first language. I can tell you more! It is third language for me! But if you just very want to put this icon, then correct me and write where is my mistace. Thank you for understanding.
Wow.Ok. One more question. What I have to do if I want to add voices for shoot_2 and shoot_1? For example, shoot_1 dog is barking and shoot_2 scream...
you can put whatever you want, the name doesn't matter, you could put "sasdafas" or "32"
No. I mean. How to add voice. For example. If plays shoot_2 have to bark if plays shoot have to scream. I wanna add a sound for each 'shoot'
Ohk I understand now. It depends on how you wabt the sound to be played. It can be played by the animation, refer to this if that is what you want
https://developer.valvesoftware.com/wiki/Animation_Events
Or you can handle it my means of scripting. Y playing the sequence and layering a sound.play function or something similar.
I wanna to make like I take a swep it shows me an animation for exmple number one on and it barks. I take again swep it shows me another animation (number two) and it meow...
Look at the valve wiki page i linked and setup sound events.
Have a look at the examples it has for Weapon Reload. That shows how animation sound events are set up for the HL2 357 revolver weapons reload animation.
https://files.facepunch.com/forum/upload/114477/ab2bde42-672f-4282-a82d-86c6d965cd28/изображение.png
Does it mean sounds will play after 28, 39,67,92 seconds?
The numbers are not seconds, but frames. To get seconds from the frame numbers, you divide the frame number by animation fps (in this case it is 30), so the first sound will play at 28/30 seconds (0.93 sec), the other at 39/30 (1.3 sec) and so on
Thanks guys for your help!
P.S. Thank you for understanding..... thanks... 2 icons.. god...
Sorry, you need to Log In to post a reply to this thread.