Does anyone have an idea on how to create (if its even possible) an ability similar to Snipe, (Armor Penetrator Snipe) but if the target transports 1 unit inside its the Unit inside that gets killed? I have tried making a trigger but Its a bit complex because you have the unit that initiates the ability, the target, and potentially a unit inside.
Create a new variable. Set it as a unit variable and leave it's default value at 'no unit'. Then create a new trigger. In the events set a 'unit uses ability'. Then in the conditions set a new one to check if the ability is your sniping ability. Then in the actions set a 'if then else'. For the conditions check if that target of the ability is your transport unit. In the 'then' actions make a 'set variable' and set the variable as the one we created earlier, make it = the targeted unit. Then create a new action under 'then'. Make it a 'pick each unit in unitgroup' one. Change it to 'pick random unit in cargo of <variable>. Then under it's actions put a 'kill picked unit'. For 'else' just create a text message that says 'you can't do that' etc.
I didn't do this with the editor, just off the top of my head so if you need help I'll actually make the trigger in the editor and post the map for you here.
Does anyone have an idea on how to create (if its even possible) an ability similar to Snipe, (Armor Penetrator Snipe) but if the target transports 1 unit inside its the Unit inside that gets killed? I have tried making a trigger but Its a bit complex because you have the unit that initiates the ability, the target, and potentially a unit inside.
@IceWendigo: Go
Create a new variable. Set it as a unit variable and leave it's default value at 'no unit'. Then create a new trigger. In the events set a 'unit uses ability'. Then in the conditions set a new one to check if the ability is your sniping ability. Then in the actions set a 'if then else'. For the conditions check if that target of the ability is your transport unit. In the 'then' actions make a 'set variable' and set the variable as the one we created earlier, make it = the targeted unit. Then create a new action under 'then'. Make it a 'pick each unit in unitgroup' one. Change it to 'pick random unit in cargo of <variable>. Then under it's actions put a 'kill picked unit'. For 'else' just create a text message that says 'you can't do that' etc.
I didn't do this with the editor, just off the top of my head so if you need help I'll actually make the trigger in the editor and post the map for you here.
Thanks for the detailed information, if you could post a basic map with the trigger it would be super!