I watched this tutorial (which is excellent fun I might add):
And my shotgun works. But I decided to duplicate it to achieve an effect of a rapid fire weapon (which I just renamed to Assault Rifle) that misses every so often. I went to the Assault Rifle Shells (Copy of Shotgun Shells, which is a Set Effect) and made it so instead of having an Effect: Minimum Count and Effect: Maximum Count of 8 (in the video he uses six, but I decided to bump up the number to eight) I changed it to 1 and only had one Assault Rifle Random Offset in the Effect: Effects + field. I noticed that the weapon still hits targets along with a sound and a muzzle flash, but the single beam does not show up. When I revert the Assault Rifle Shells back to the default, multiple beams showed up again. Does anyone know what is happening?
Alright, I'll go through the process as best I can.
The Shotgun's Weapon's Effect is Shotgun Shells
Shotgun Shells is a Set Effect that calls Shotgun Random Offset 8 times which is a Create Persistent Effect
Shotgun Random Offset calls the Shotgun Search Targets Effect which is a Search Area Effect with a small radius
The Search: Areas+ in Shotgun Search Targets has the Shotgun Damage Effect
For the beams, there are two sites: A Shotgun Beam Launch Site (a Site Actor based on SiteUNIT)
and a Shotgun Beam Impact Site (a Site Actor based on CActorSite) The Impact Sites creates themselves at the locations of the Search Area Effects
There is then the Shotgun Beam itself which essentially through events links itself between the two points.
Finally there is the Shotgun Attack Actor (an Action Actor) just copied from the Marine's Attack actor but with different launch Assets and the Attack Effect changed to Shotgun Search Targets.
Odd, the Damage effect can have splash without a Search Area effect. Probable cause is with copying your Art - Beam field has been corrupted on your Action actor, look for the 2 being in the wrong spot. Else your events are not refering to the new effect (maybe on the impact Site actors).
If that does not solve the problem upload the map so others and I can look through the problematic data tree.
Yeah, it can, but the search area isn't for splash damage, it is to see if the bullet actually hits anything at the offset.
The thing is, I doubt it is corruption because when I rack up the number of Random Offsets created by Shotgun shells, the beams show, but when only one is created no beam shows. I'd also like to note that I just remembered the Art: Beam field isn't even used in the tutorial, he does something to get around it I think.
This map has a bunch of other stuff in it, but the things you'll want to look for are Shotgun and Assault Rifle.
By the way, the Enforcer (War Pig Merc) in my map has the original Shotgun, and the Grunt (Marine) has the Assault Rifle.
Ok, the reason the Art: Beam field was avoided is because when using multiple beams it would only show a single one or something like that, but I decided since this weapon only fires one bullet to use it anyways. A beam does show now, but I've encountered another problem. The beam, sound, and muzzle flash only show up/play when actual damage is dealt. Otherwise the marine just animates but nothing happens if the bullet misses.
I'm getting a strange error about only being able to create one CActor per effect, or something along those lines. Also when I make the unit with the shotgun attack I hear the marine's attack sound.
Ok, I'm sorry, I take that back. Lol. I'll understand if no one decides to respond. I went back a map version and got stuff back together, so I'm back at not having a beam, but that's not what I'm mainly worried about now. I made sure the Target - Impact Location - Value of the damage effect was set to target unit/point. I changed the Event in the Attack Actor responsible for creating it to something like this (based on what DrSuperEvil suggested):
WeaponStart.AssaultRifle
-> At Caster
- Create
When I change it to that, instead of showing the Marine's launch attack model and playing the Marine's attack sound only when it hits the target, it doesn't show/play them at ALL. I tried fiddling with the fields such as making the Sub Name: Attack Start instead of (Any) but it results in the same thing.
I watched this tutorial (which is excellent fun I might add):
And my shotgun works. But I decided to duplicate it to achieve an effect of a rapid fire weapon (which I just renamed to Assault Rifle) that misses every so often. I went to the Assault Rifle Shells (Copy of Shotgun Shells, which is a Set Effect) and made it so instead of having an Effect: Minimum Count and Effect: Maximum Count of 8 (in the video he uses six, but I decided to bump up the number to eight) I changed it to 1 and only had one Assault Rifle Random Offset in the Effect: Effects + field. I noticed that the weapon still hits targets along with a sound and a muzzle flash, but the single beam does not show up. When I revert the Assault Rifle Shells back to the default, multiple beams showed up again. Does anyone know what is happening?
As the tutorial is too long winded for me to watch through, summarize how the weapon works.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Alright, I'll go through the process as best I can.
The Shotgun's Weapon's Effect is Shotgun Shells
Shotgun Shells is a Set Effect that calls Shotgun Random Offset 8 times which is a Create Persistent Effect
Shotgun Random Offset calls the Shotgun Search Targets Effect which is a Search Area Effect with a small radius
The Search: Areas+ in Shotgun Search Targets has the Shotgun Damage Effect
For the beams, there are two sites: A Shotgun Beam Launch Site (a Site Actor based on SiteUNIT)
and a Shotgun Beam Impact Site (a Site Actor based on CActorSite) The Impact Sites creates themselves at the locations of the Search Area Effects
There is then the Shotgun Beam itself which essentially through events links itself between the two points.
Finally there is the Shotgun Attack Actor (an Action Actor) just copied from the Marine's Attack actor but with different launch Assets and the Attack Effect changed to Shotgun Search Targets.
I hope I didn't forget anything.
Odd, the Damage effect can have splash without a Search Area effect. Probable cause is with copying your Art - Beam field has been corrupted on your Action actor, look for the 2 being in the wrong spot. Else your events are not refering to the new effect (maybe on the impact Site actors).
If that does not solve the problem upload the map so others and I can look through the problematic data tree.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
@DrSuperEvil: Go
Yeah, it can, but the search area isn't for splash damage, it is to see if the bullet actually hits anything at the offset.
The thing is, I doubt it is corruption because when I rack up the number of Random Offsets created by Shotgun shells, the beams show, but when only one is created no beam shows. I'd also like to note that I just remembered the Art: Beam field isn't even used in the tutorial, he does something to get around it I think.
This map has a bunch of other stuff in it, but the things you'll want to look for are Shotgun and Assault Rifle.
By the way, the Enforcer (War Pig Merc) in my map has the original Shotgun, and the Grunt (Marine) has the Assault Rifle.
Ok, the reason the Art: Beam field was avoided is because when using multiple beams it would only show a single one or something like that, but I decided since this weapon only fires one bullet to use it anyways. A beam does show now, but I've encountered another problem. The beam, sound, and muzzle flash only show up/play when actual damage is dealt. Otherwise the marine just animates but nothing happens if the bullet misses.
Then alter the events so that it plays when the weapon animates or allow it to hit a target/point.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
How could I do that?
Under the events there is one called Weapon Start while the Target - Impact Location - Value of the Damage effect can be set to target unit/point.
Also the action actor has a Sound - Launch sound field and the Art - Launch Model field
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
I'm getting a strange error about only being able to create one CActor per effect, or something along those lines. Also when I make the unit with the shotgun attack I hear the marine's attack sound.
Check the Action type actor for the weapon. Make sure there are not several events leading to the actor creation each time it fires.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Thanks for all of the time and help, but I'm just going to give up on this. Lol.
Ok, I'm sorry, I take that back. Lol. I'll understand if no one decides to respond. I went back a map version and got stuff back together, so I'm back at not having a beam, but that's not what I'm mainly worried about now. I made sure the Target - Impact Location - Value of the damage effect was set to target unit/point. I changed the Event in the Attack Actor responsible for creating it to something like this (based on what DrSuperEvil suggested):
WeaponStart.AssaultRifle
-> At Caster
- Create
When I change it to that, instead of showing the Marine's launch attack model and playing the Marine's attack sound only when it hits the target, it doesn't show/play them at ALL. I tried fiddling with the fields such as making the Sub Name: Attack Start instead of (Any) but it results in the same thing.
My advice is make your own ability from scratch.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Lol alright.