Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline Ace40k  
#1 Posted : Sunday, October 14, 2018 9:46:07 AM(UTC)
Ace40k
Private
Joined: 4/1/2018(UTC)
Posts: 9

Thanks: 2 times
Was thanked: 1 time(s) in 1 post(s)
i am back at modding this great game again and spent the last days implementing a new unit from another mod into my own private mod. it's the russian S300, a heavy anti-air unit that needs to deploy before shooting.

everything works as it should but i cannot get one little thing to work properly: basically when the deploy button is clicked, the unit should emit a deploy sound when erecting the missile tubes as well as a voice command saying something like "ready to fire".

here's the code from GLAVehicle.ini:

Quote:

; *** AUDIO Parameters ***
UnitSpecificSounds
VoiceCreate = S300VoiceCreate
Deploy = S300Deploy
Deploy = S300VoiceReady

Undeploy = S300Undeploy
VoiceEnter = S300VoiceMove
End


the problem is i cannot have them play at the same time! either one or the other works only. i thought maybe there is one simple coding trick that i'm missing. until now it seriously took me a long time when i tried different things to make this work, to no avail!

is it even possible to have two audio files play on one action? please let me know! thanks
Sponsor
Offline UTD^Force  
#2 Posted : Sunday, October 14, 2018 10:35:26 AM(UTC)
UTD^Force
Colonel
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 8/13/2013(UTC)
Posts: 817
Jordan
Location: Middle east

Thanks: 430 times
Was thanked: 184 time(s) in 168 post(s)
I've tried doing this:
Code:
Object ChinaVehicleNukeLauncher
  VoiceAttack = EvaGLA_AllyUnderAttack
  UnitSpecificSounds
    VoiceCreate         = NukeCannonVoiceCreate
    TurretMoveStart     = NoSound
    TurretMoveLoop      = NukeCannonTurretMoveLoop
    VoiceEnter          = NukeCannonVoiceMove
    Deploy              = NukeCannonDeploy
    Undeploy            = NukeCannonUnDeploy
  End
End

Only the nukecannondelpoy sound effect played.
I used EvaGLA_AllyUnderAttack as it as a DialogueEvent and not an AudioEvent. And I also tried making them both audio events but it didn't work.
When I tried this:

Deploy = EvaGLA_AllyUnderAttack
Deploy = NukeCannonDeploy

The first one will be played but the second one won't.
So, if no one provides a solution, you can use an audio editor to merge the two sounds into one. You can let the speech play first "ready to fire" then when it ends or before it ends you can add the deploying sound effect.
If you don't have an audio editor, you can use audacity, it is a free and simple audio editing software. Good luck.
Proud Muslim

UTD^Force

Moderator and former map reviewer
CnC Labs
Offline Ace40k  
#3 Posted : Sunday, October 14, 2018 11:16:01 AM(UTC)
Ace40k
Private
Joined: 4/1/2018(UTC)
Posts: 9

Thanks: 2 times
Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: UTD^Force Go to Quoted Post
you can use an audio editor to merge the two sounds into one

that's an option i actually wanted to avoid. because both sounds come from different sources, deploy audio being part of soundeffects.ini and voice audio from voice.ini, former playing for the world, the latter for the player only. it may sound inconsistently once both audio types are merged together

thanks for your help, though! still surprised there is no easier way via coding to accomplish this
Offline UTD^Force  
#4 Posted : Sunday, October 14, 2018 11:19:31 AM(UTC)
UTD^Force
Colonel
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 8/13/2013(UTC)
Posts: 817
Jordan
Location: Middle east

Thanks: 430 times
Was thanked: 184 time(s) in 168 post(s)
Originally Posted by: Ace40k Go to Quoted Post
still surprised there is no easier way via coding to accomplish this



There might be a way, you can wait until someone else responds. I'll look into it again later.
Proud Muslim

UTD^Force

Moderator and former map reviewer
CnC Labs
Offline Zatsupachi  
#5 Posted : Monday, October 15, 2018 5:31:50 PM(UTC)
Zatsupachi
Major
Joined: 3/27/2015(UTC)
Posts: 490

Thanks: 5 times
Was thanked: 213 time(s) in 155 post(s)
Does it deploy on a button?
If so, just add "UnitSpecificSound = mySound" on the button.

And have deployed sound on the object itself.
"It's precision_bomber."

Death Label HAS BEEN RELEASED(go get v0.99):
http://www.moddb.com/mod...oads/death-label-ver-099

Next Episode:
precision_bomber's Zero Hour SCIENCE!
Offline Ace40k  
#6 Posted : Tuesday, October 16, 2018 3:46:37 PM(UTC)
Ace40k
Private
Joined: 4/1/2018(UTC)
Posts: 9

Thanks: 2 times
Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: Zatsupachi Go to Quoted Post
Does it deploy on a button?
If so, just add "UnitSpecificSound = mySound" on the button.

And have deployed sound on the object itself.

to be honest i actually tried a similar thing already. i am not totally sure with the unit's code but upon clicking the deploy button some kind of invisible turret is created that shoots the anti-air missiles in the end. undeploying "destroys" that turret on the other hand and makes the unit move again.

that said, no audio parameter for that turret object worked, i tried almost all commands known to me (voiceguard, voiceattack, voicecreate, deploy, etc) and not one played the desired voice line. how exactly did you go about this?
Offline Zatsupachi  
#7 Posted : Wednesday, October 17, 2018 10:21:04 AM(UTC)
Zatsupachi
Major
Joined: 3/27/2015(UTC)
Posts: 490

Thanks: 5 times
Was thanked: 213 time(s) in 155 post(s)
You mentioned that you got this from a mod; if it worked there it should work the same way if you copy-posta'd everything.

Also yeah, deploy-style units are like that. Look at the nuke cannon, and it's model especially, it has two guns, one when it's folded in, the other when it's upright, the folded in version animates into the upright position and once it gets to that position, it hides the sub-objects for it anfmd shows the sub-objects of the hidden upright positioned gun. The upright-position gun is the one actually doing the targetting, which is invisible until the unitil is fully unpacked.

I'll run a bit of tests myself, and we'll see if I can make a thing work.
"It's precision_bomber."

Death Label HAS BEEN RELEASED(go get v0.99):
http://www.moddb.com/mod...oads/death-label-ver-099

Next Episode:
precision_bomber's Zero Hour SCIENCE!
Offline Zatsupachi  
#8 Posted : Wednesday, October 17, 2018 11:44:56 AM(UTC)
Zatsupachi
Major
Joined: 3/27/2015(UTC)
Posts: 490

Thanks: 5 times
Was thanked: 213 time(s) in 155 post(s)
Okay... There is no audio parameter-- or otherwise a documented one if an object
has finished deploying.

I think I know which S300 object code you're looking and it may look similar to
the things I'll be describing below.

After some checking;
you say you got this unit from a mod and that it has a "deploy" button.
attaching a sound to it works:

Code:

CommandButton Command_CWCruFakeRider_Inf_Prone
  Command = SPECIAL_POWER
  SpecialPower = SpecialAbilityCWCruFakeRider_Inf_Prone
  Options =  NEED_SPECIAL_POWER_SCIENCE  OK_FOR_MULTI_SELECT
  TextLabel = CONTROLBAR:UpacingS300
  ButtonImage = S300
  ButtonBorderType = SYSTEM
  DescriptLabel = CONTROLBAR:CommandUpacingS300
  UnitSpecificSound       = NukeCannonVoiceCreate ;DEPLOYING SOUND ;Topol_m_AnimationSound
END


HOWEVER. We've hit a brick wall to when say when it is ready to fire.
Since there is no audio parameter for it, the scummier way of doing it is
to have it create an object the emits a sound and deletes itself afterwards.

Open the spoiler for the scummy way.
"It's precision_bomber."

Death Label HAS BEEN RELEASED(go get v0.99):
http://www.moddb.com/mod...oads/death-label-ver-099

Next Episode:
precision_bomber's Zero Hour SCIENCE!
Offline Gameanater  
#9 Posted : Wednesday, October 17, 2018 9:35:27 PM(UTC)
Gameanater
General
C&C Labs Staff: Labs Staff MemberMaps Staff: Maps Staff Member
Joined: 5/13/2013(UTC)
Posts: 1,537
United States
Location: Right Behind You

Thanks: 574 times
Was thanked: 166 time(s) in 144 post(s)
one possible issue. Would it be possible to kill the deploying unit but not the main unit, leaving it playing the sound after it has died?
Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.
Offline Zatsupachi  
#10 Posted : Wednesday, October 17, 2018 11:08:49 PM(UTC)
Zatsupachi
Major
Joined: 3/27/2015(UTC)
Posts: 490

Thanks: 5 times
Was thanked: 213 time(s) in 155 post(s)
Yes actually, you can kill the sound emitter. And it'll play the sound early. You can assign it InvulnerableAllArmor and give it hp to make it more fool-proof.
"It's precision_bomber."

Death Label HAS BEEN RELEASED(go get v0.99):
http://www.moddb.com/mod...oads/death-label-ver-099

Next Episode:
precision_bomber's Zero Hour SCIENCE!
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.