[No] A_Chase w/ Custom Sound played

Moderator: GZDoom Developers

A_Chase w/ Custom Sound played

Postby BouncyTEM » Tue Apr 05, 2005 2:08 pm

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.
User avatar
BouncyTEM
All Caps Guy, Maker of Sir Belfin Dramatic Reading Series.
 
Joined: 24 Aug 2003
Location: 2280 Lol Street: The Calamitous Carnival (formerly Senators Prison)

Postby Graf Zahl » Tue Apr 05, 2005 2:17 pm

Already possible. Just look at the CyberMastermind in the monster pack:

Code: Select allExpand view
   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


No need to create new code pointers!
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby BouncyTEM » Tue Apr 05, 2005 2:29 pm

well, it would be useful as a code pointer for those monsters you just can't get the playsound to do it at the EXACT moment you want it, would it not?
(i know this from a monster i had made. i messed with A_Playsound and A_Chase like a maniac. no luck.)
User avatar
BouncyTEM
All Caps Guy, Maker of Sir Belfin Dramatic Reading Series.
 
Joined: 24 Aug 2003
Location: 2280 Lol Street: The Calamitous Carnival (formerly Senators Prison)

Postby Graf Zahl » Tue Apr 05, 2005 4:15 pm

XXXX A 4 A_Metal is 100% the same as

XXXX A 0 A_PlaySound("cyber/hoof")
XXXX A 4 A_Chase

in terms of timing. If you have problems you made an error.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby Zippy » Wed Apr 06, 2005 9:52 am

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

Code: Select allExpand view
XXXX ABC 16 A_Chase
XXXX C 0 A_PlaySound("cyber/hoof")


And now how about playing the hoof sound every 16th tic...

Code: Select allExpand view
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


And every 8th tic...

Code: Select allExpand view
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


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.
User avatar
Zippy
Your Golden Boy
 
Joined: 23 Mar 2005
Location: New Jersey
Discord: Zurock#4834

Postby BouncyTEM » Wed Apr 06, 2005 1:22 pm

yeah, i messed up. oh well. at least i was thinking of a decorate feature which might cut down some coding, but i guess people can't be lazy. :P
User avatar
BouncyTEM
All Caps Guy, Maker of Sir Belfin Dramatic Reading Series.
 
Joined: 24 Aug 2003
Location: 2280 Lol Street: The Calamitous Carnival (formerly Senators Prison)

Postby Anakin S. » Wed Apr 06, 2005 1:55 pm

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.
User avatar
Anakin S.
Am I evil?
 
Joined: 28 Nov 2003
Location: A long time ago in a galaxy far, far away...

Postby Graf Zahl » Wed Apr 06, 2005 2:32 pm

Bouncy wrote:yeah, i messed up. oh well. at least i was thinking of a decorate feature which might cut down some coding, but i guess people can't be lazy. :P


Lazy indeed! :P
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest