I've made a trigger which causes a unit to launch a Yamato Cannon - Missile Effect to another unit using the trigger below.
Environment - Create Battlecruiser - Yamato Cannon (Missile) on (Picked unit) from Spellcaster[(Triggering player)]
No sound effect plays thou, either on the launch nor the impact. How do you enable the sound effect as well or whats the best method of achieving this?
To make sounds you have to make actors represent them. It'd probably be more convenient to do all that in the data editor as opposed to triggers though if you wanted to reuse it.
Example (if you want this to be an ability. Sound stuff is down below if you just want that):
Make a new object (right click) in the ability section of the data editor, name it whatever you want the ability to be named, click the suggest button, make it an effect - target, and hit ok.
Go to effects and make a launch missile effect (suggest again etc), and under impact location make sure target unit is selected (under target tab), then go to the unit tab and make the yamato missile the ammo unit.
I'm assuming you want to make this do damage to a single unit, so make a damage effect, go to the combat tab, and set the damage amount under amount, then you can also set the death type in the effect tab.
Go back to the launch missile effect you created earlier, go to the effect tab, and select your damage effect in the impact effect dropdown.
Go to the buttons section and make a new button, set both tooltips/the hotkey to whatever you want, and choose two button graphics.
Go to the ability you first made, and under the ability tab, under commands, click the execute option, and in the default button dropdown select your button. Then go to the effect tab and make your launch missile effect the ability effect.
Sound stuff starts here:
Go to actors in the data editor, and make a sound, and make it based on soundoneshot. To make an impact sound, create a new event within this actor (right click the space under actor event), make the msg type effect, the source name your launch missile effect, and the sub name impact. Make the event action "create." Now go to the sound tab, and select whatever sound you want.
To make a launch effect you can do the same thing as above except you make the event something like msg type ability, source name ability name, sub name sourcecaststart. You could probably also do it with the launch missile thing before if you set the subname to start, though I've never tried that.
If you want an impact animation, make a model actor, and base it on modelanimationstyleoneshot. The new event would be effect, what you named your launch missile, then impact, just like the first sound above, then make the action create. Go to the art tab, then under model you can select your animation. There's a specific one in there for battlecruiser yamato impact but you can choose others if you want.
To make all this stuff happen btw, you need to assign the ability made in the first section to whatever unit is going to cast it, which would mean selecting the unit in the unit section, adding the ability under the ability tab, adding the button for it under unit commands, setting command type to ability command, then set the ability and ability command to whatever you just made. (if something doesn't show up try deselecting the unit in the data editor then reselecting).
There's probably way simpler methods of doing all this, but there's one way : P
Thanks alot for such a detailed reply, I learned alot :)
Firstly thou, it's not exactly a custom ability or something along those lines. It's in a card game type map where you use a 'fireball' card and your Main Structure launches a big 'fireball' towards the designated target.
That's why I just went with the effect method, simply create a Yamato Missile missile effect. visually it works perfectly, but just no sounds are played.
I had a look in the data editor as you said and on what you described, the actors and sounds, they are all already in there, yet don't seem to be used? I just used the default Yamato Cannon as it was already preset with the desired effects and sounds.
EDIT: It seems as I had the camera zoomed out quite a bit, it was nullifying all sounds, that was the problem.
I've made a trigger which causes a unit to launch a Yamato Cannon - Missile Effect to another unit using the trigger below.
Environment - Create Battlecruiser - Yamato Cannon (Missile) on (Picked unit) from Spellcaster[(Triggering player)]
No sound effect plays thou, either on the launch nor the impact. How do you enable the sound effect as well or whats the best method of achieving this?
To make sounds you have to make actors represent them. It'd probably be more convenient to do all that in the data editor as opposed to triggers though if you wanted to reuse it.
Example (if you want this to be an ability. Sound stuff is down below if you just want that):
Make a new object (right click) in the ability section of the data editor, name it whatever you want the ability to be named, click the suggest button, make it an effect - target, and hit ok.
Go to effects and make a launch missile effect (suggest again etc), and under impact location make sure target unit is selected (under target tab), then go to the unit tab and make the yamato missile the ammo unit.
I'm assuming you want to make this do damage to a single unit, so make a damage effect, go to the combat tab, and set the damage amount under amount, then you can also set the death type in the effect tab.
Go back to the launch missile effect you created earlier, go to the effect tab, and select your damage effect in the impact effect dropdown.
Go to the buttons section and make a new button, set both tooltips/the hotkey to whatever you want, and choose two button graphics.
Go to the ability you first made, and under the ability tab, under commands, click the execute option, and in the default button dropdown select your button. Then go to the effect tab and make your launch missile effect the ability effect.
Sound stuff starts here:
Go to actors in the data editor, and make a sound, and make it based on soundoneshot. To make an impact sound, create a new event within this actor (right click the space under actor event), make the msg type effect, the source name your launch missile effect, and the sub name impact. Make the event action "create." Now go to the sound tab, and select whatever sound you want.
To make a launch effect you can do the same thing as above except you make the event something like msg type ability, source name ability name, sub name sourcecaststart. You could probably also do it with the launch missile thing before if you set the subname to start, though I've never tried that.
If you want an impact animation, make a model actor, and base it on modelanimationstyleoneshot. The new event would be effect, what you named your launch missile, then impact, just like the first sound above, then make the action create. Go to the art tab, then under model you can select your animation. There's a specific one in there for battlecruiser yamato impact but you can choose others if you want.
To make all this stuff happen btw, you need to assign the ability made in the first section to whatever unit is going to cast it, which would mean selecting the unit in the unit section, adding the ability under the ability tab, adding the button for it under unit commands, setting command type to ability command, then set the ability and ability command to whatever you just made. (if something doesn't show up try deselecting the unit in the data editor then reselecting).
There's probably way simpler methods of doing all this, but there's one way : P
Thanks alot for such a detailed reply, I learned alot :)
Firstly thou, it's not exactly a custom ability or something along those lines. It's in a card game type map where you use a 'fireball' card and your Main Structure launches a big 'fireball' towards the designated target.
That's why I just went with the effect method, simply create a Yamato Missile missile effect. visually it works perfectly, but just no sounds are played.
I had a look in the data editor as you said and on what you described, the actors and sounds, they are all already in there, yet don't seem to be used? I just used the default Yamato Cannon as it was already preset with the desired effects and sounds.
EDIT: It seems as I had the camera zoomed out quite a bit, it was nullifying all sounds, that was the problem.