Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Move After Death problems
#1
I have one of my characters set up so that he will use the Move After Death function in order to simulate a death quote. In the lying frame, an object is opointed. That object is set up to play the death sound when created.

Character Data:
    DC-Code:
<frame> 230 lying
   pic: 34  state: 14  wait: 30  next: 219  dvx: 0  dvy: 0  dvz: 0  centerx: 39  centery: 72  hit_a: 0  hit_d: 0  hit_j: 0
   opoint:
      kind: 1  x: 40  y: 75  action: 247  dvx: 0  dvy: 0  oid: 271  facing: 0
   opoint_end:
   wpoint:
      kind: 1  x: 35  y: 74  weaponact: 32  attacking: 0  cover: 0  dvx: 0  dvy: 0  dvz: 0 
   wpoint_end:
<frame_end>
 
<frame> 231 lying
   pic: 44  state: 14  wait: 30  next: 219  dvx: 0  dvy: 0  dvz: 0  centerx: 39  centery: 75  hit_a: 0  hit_d: 0  hit_j: 0
   opoint:
      kind: 1  x: 40  y: 75  action: 247  dvx: 0  dvy: 0  oid: 271  facing: 0
   opoint_end:
   wpoint:
      kind: 1  x: 51  y: 76  weaponact: 24  attacking: 0  cover: 0  dvx: 0  dvy: 0  dvz: 0 
   wpoint_end:
<frame_end>



Object Data:
    DC-Code:
<frame> 247 death sound
   pic: 0  state: 15  wait: 1  next: 248  dvx: 0  dvy: 0  centerx: 0  centery: 0  hit_a: 0  hit_d: 0  hit_j: 0
   opoint:
      kind: 1  x: 0  y: 0  action: 248  dvx: 0  dvy: 0  oid: 271  facing: 0
   opoint_end:
<frame_end>
 
<frame> 248 death sound
   pic: 0  state: 15  wait: 1  next: 249  dvx: 0  dvy: 0  centerx: 0  centery: 0  hit_a: 0  hit_d: 0  hit_j: 0
  sound: data\khvoice\xideath.wav 
<frame_end>
 
<frame> 249 death sound
   pic: 0  state: 15  wait: 1  next: 1000  dvx: 0  dvy: 0  centerx: 0  centery: 0  hit_a: 0  hit_d: 0  hit_j: 0
<frame_end>


What happens is, the object appears after the character is dead (just like it is supposed to) but no sound plays. The object also stays there forever without disappearing. When F4 is pressed to exit V.S. mode, the sound plays. O.o
Obviously I want the sound to play as soon as my character dies, not when I exit V.S mode. Is there something I am doing wrong with the code? Any suggestions would be greatly appreciated.
Reply
Thanks given by:
#2
What is object of id: 271 in your data.txt?
[Image: icyboards-ad-468x60.gif]
Reply
Thanks given by:
#3
I don't know if you've used the Move After Death technique from the mainsite (or how it works), but once a character is dead and he reaches the lying frames, the lying frame repeats itself with a wait of 0 or 1. That basically means your opoint is spawned every frame, which causes oid271 objects to appear continuously every frame. And since the same sound effect cannot be played two at a time, the first instance of the sound effect is cut off when the second one starts. That means it does actually play your sound, but only for a frame until the next object plays the same sound (which cuts off the previous sound).

Solution? Sadly have none, but there are a few advanced DCers around who probably know a way to circumvent this.
Quote of the Day f***ing Year (Click to View)
Reply
Thanks given by:
#4
(04-15-2012, 06:45 AM)Ramond Wrote:  I don't know if you've used the Move After Death technique from the mainsite (or how it works), but once a character is dead and he reaches the lying frames, the lying frame repeats itself with a wait of 0 or 1. That basically means your opoint is spawned every frame, which causes oid271 objects to appear continuously every frame. And since the same sound effect cannot be played two at a time, the first instance of the sound effect is cut off when the second one starts. That means it does actually play your sound, but only for a frame until the next object plays the same sound (which cuts off the previous sound).

Solution? Sadly have none, but there are a few advanced DCers around who probably know a way to circumvent this.

Ah, ha! Yes that does make sense.
After further testing I have discovered that this is the case. The object is being spawned every TU and the sound is palying, but it is being overwritten by the next one before it can play.

Therefore, I need to figure out a way to get the object to be opointed only once. Or a way to get the sound to be played only from the first opointed object.
Reply
Thanks given by:
#5
UPDATE

So I've experimented a bit more with this, but I am unfortunately still at a loss for how to solve the problem.
As I said before, I need to find a way to get the sound to only be played once.

Have any advanced DCers out there ever figured out how to accomplish a similar task?
Reply
Thanks given by:
#6
I'm by no means an advanced DC'er, but I think I know an - albeit messy - solution.
In the first frame of the object, you can place an itr/k: 8 that reacts to a bdy: at a certain y-value. Additionally, you opoint out a t0 that has that special bdy (perhaps you need a small delay for it to work, I'm not quite sure). What should happen is that the first object plays the sound, because the t0 doesn't exist yet, but all objects afterwards react to it and are sent to a deletion frame (via the dvx: in the itr/k:8). The t0 itself should only be there for a limited time, because it also will be opointed every few TU's.
The messy part is that the t0 will show the "Com" logo. I think there was a workaround, though. I'll see if I can find it.
Edit: Alright, found it:
http://www.lf-empire.de/forum/thread-4603.html

Basically, you make your object invisible via next:12xx. From then onwards, all t0 that get opointed are also invisible.
Reply
Thanks given by:
#7
if you can also accomplish things like that you are an advanced dcer, reaper ;)
however there are easier methods to achieve what you described

lets break it down to what makes this work:
-the spawned move after death object will interact with itself in case there is a second/third instance of it
-while the first one that spawned will always be one step ahead of the others and hence should, inside the second frame, stop the ones coming afterwards right in the first frame (before they can reach any sound making)

if you have a full type 3 object at your disposal you can do this with simple destroying/rebounding/hitting methods (frame 10,20,30 once the objects hp is empty, depending on what it was hit by)
the hitting sound of the object would of course need to be something that is either totally mute or mutes itself just like the one you have here when it is constantly played

if the hit frames or not available for the deletion it can also be made custom by using a 'timer':
hit_a: inside a type 3 deducts the noted amount of hp and if it reaches 0 inside that frame it will go to the frame noted in hit_d:
this also works when it reaches 0 because it was hit rather than deducting hp on its own

(05-01-2012, 12:30 PM)Reaper Wrote:  Basically, you make your object invisible via next:12xx. From then onwards, all t0 that get opointed are also invisible.

another little trick: in case frame 0 of the object is not available (because next: 12xx will lead there)
you can instead use the action: 12xx inside a wpoint (spawning an on hand object and making it invisible while forcing it to go to another frame than 0 afterwards)
Reply
Thanks given by: Marko pro




Users browsing this thread: 1 Guest(s)