A_Chase w/ Custom Sound played
Moderator: GZDoom Developers
-
- Posts: 3821
- Joined: Sun Aug 24, 2003 5:42 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: 2280 Lol Street: The Calamitous Carnival (formerly Senators Prison)
A_Chase w/ Custom Sound played
this would be extremely useful due to the fact it would allow monsters with sounds being played per step (like Cybie) but not actually using the Cybie's walking sound or be based on the Cybie. would help greatly.
-
- Lead GZDoom+Raze Developer
- Posts: 49194
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Already possible. Just look at the CyberMastermind in the monster pack:
No need to create new code pointers!
Code: Select all
See:
CYMM AABB 3 A_Chase
CYMM B 0 A_PlaySound("spider/walk")
CYMM CCDD 3 A_Chase
CYMM D 0 A_PlaySound("spider/walk")
CYMM EEFF 3 A_Chase
CYMM F 0 A_PlaySound("spider/walk")
Loop
-
- Posts: 3821
- Joined: Sun Aug 24, 2003 5:42 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: 2280 Lol Street: The Calamitous Carnival (formerly Senators Prison)
-
- Lead GZDoom+Raze Developer
- Posts: 49194
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
-
- Posts: 3302
- Joined: Wed Mar 23, 2005 5:31 pm
- Location: New Jersey
How is it not possible to get the timing you want? Frames with a display 0 never visably show up, but their code pointers will still execute. Sometimes there has to be some expansion, but it still works.
Playing the hoof sound at the end of 48 tics...
And now how about playing the hoof sound every 16th tic...
And every 8th tic...
In terms of timing, all three examples take up the same number of tics. The first one is 42 tics, the second one is 42 tics, and the third one is 42 tics. So all three of these occur in the same exact period of time, but the sound is playing a different intervals for each. You don't even have to keep the intervals even if you really don't want to.
Playing the hoof sound at the end of 48 tics...
Code: Select all
XXXX ABC 16 A_Chase
XXXX C 0 A_PlaySound("cyber/hoof")
Code: Select all
XXXX A 0 A_PlaySound("cyber/hoof")
XXXX A 16 A_Chase
XXXX B 0 A_PlaySound("cyber/hoof")
XXXX B 16 A_Chase
XXXX C 0 A_PlaySound("cyber/hoof")
XXXX C 16 A_Chase
Code: Select all
XXXX A 0 A_PlaySound("cyber/hoof")
XXXX A 8 A_Chase
XXXX A 0 A_PlaySound("cyber/hoof")
XXXX A 8 A_Chase
XXXX B 0 A_PlaySound("cyber/hoof")
XXXX B 8 A_Chase
XXXX B 0 A_PlaySound("cyber/hoof")
XXXX B 8 A_Chase
XXXX C 0 A_PlaySound("cyber/hoof")
XXXX C 8 A_Chase
XXXX C 0 A_PlaySound("cyber/hoof")
XXXX C 8 A_Chase
-
- Posts: 3821
- Joined: Sun Aug 24, 2003 5:42 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: 2280 Lol Street: The Calamitous Carnival (formerly Senators Prison)
-
- Posts: 1067
- Joined: Fri Nov 28, 2003 9:39 pm
- Location: A long time ago in a galaxy far, far away...
Here's something I think needs to be cut down in the amount of coding. To make something random requires a lot of A_Jump statements, which can quickly get messy. I understand that A_Jump is useful for multiple attack sequences like the maulotaur, but for things reproducing a projectile that shoots particles out the back in random directions similar to the D'sparil lightning, this method would become quite cumbersome.
-
- Lead GZDoom+Raze Developer
- Posts: 49194
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany