Posted by: Zatsupachi - Tuesday, September 15, 2015 12:03:09 AM
So... I want a unit to kill itself after shooting its weapon. What I've tried: FireWeaponUpdate - it killed the other units beside it too. FireOCL - spawns an object that emits a kill field for around the shooter. Doesn't work-- or more over, I couldn't check since it disappears nearly-instantaneously. ALSO DRONES. Is there a way to let drones target things more reliably? They seem to not shoot down everything what their master is trying to shoot.

Posted by: acidbrain - Tuesday, September 15, 2015 7:33:41 AM
Did you try this module? [code=plain] FireOCLAfterWeaponCooldownUpdate WeaponSlot = [PRIMARY/SECONDARY/TERTIARY] TriggeredBy = [entry(s) from Upgrade.INI] ConflictsWith = [entry(s) from Upgrade.INI] OCL = [entry from ObjectCreationList.INI] MinShotsToCreateOCL = [integer] OCLLifetimePerSecond = [integer] OCLLifetimeMaxCap = [integer] End [/code] Don't know if you actually need an upgrade to trigger this module, never used it. Maybe you can give the spawned object a `FireWeaponWhenDeadBehavior` module with a weapon that has PENALTY damagetype and only the unit that fires the weapon will be injured by the weapon. Don't know if it works, didn't test it.

Posted by: Gameanater - Wednesday, September 16, 2015 3:30:41 PM
[quote=Zatsupachi;138510] ALSO DRONES. Is there a way to let drones target things more reliably? They seem to not shoot down everything what their master is trying to shoot.[/quote] I don't remember if the Battle Drone has turret code, but for that at least it seems like you could change the TurningSpeed for the turret (if it has one) to something like 99999 to help. The Hellfire Drone seems to do an alright job targeting the same thing its boss is to me but the Battle Drone does seem a little slow.

Posted by: oliver - Wednesday, September 16, 2015 3:40:29 PM
For the Drones targeting, check the ROTR american wasp or the Recycler wasp, it does what you want.

Posted by: Zatsupachi - Saturday, September 19, 2015 10:42:32 AM
The WASP system. It was basically-- the same concept... as the Unit I was making. However. I aimed for something complex. While the WASP System from RoTR, had SHOOTING Drones... Mine don't. They kamikaze themselves into their targets. My problem is they have certain wait time till they detonate on their target-- which I fear will be enough time to shoot down the drone before it can detonate. Make the unit essentially useless if your opponent just so happens to have the smallest amount of anti-air. Hence I thought of alternatives. Like having the drone "shoot itself" towards the enemy. By means, the drone shoots a weapon that kills itself and the weapon's projectile is the drone itself- with a little trickery, I can make it look like the drones are boosting into their targets... I am using the PENALTY damage type that emits from the shot weapon, on the unit to kill it and made an armor susceptible to it. But just seems to kill the other drones besides the one shooting.

Posted by: Gameanater - Saturday, September 19, 2015 2:41:36 PM
[quote=Zatsupachi;138561]The WASP system. It was basically-- the same concept... as the Unit I was making. However. I aimed for something complex. While the WASP System from RoTR, had SHOOTING Drones... Mine don't. They kamikaze themselves into their targets. My problem is they have certain wait time till they detonate on their target-- which I fear will be enough time to shoot down the drone before it can detonate. Make the unit essentially useless if your opponent just so happens to have the smallest amount of anti-air. Hence I thought of alternatives. Like having the drone "shoot itself" towards the enemy. By means, the drone shoots a weapon that kills itself and the weapon's projectile is the drone itself- with a little trickery, I can make it look like the drones are boosting into their targets... I am using the PENALTY damage type that emits from the shot weapon, on the unit to kill it and made an armor susceptible to it. But just seems to kill the other drones besides the one shooting.[/quote] You probably want to base the drone off a GLA Terrorist if you're going for a $u!c!de unit and then add all the Slave code and the flying locomotor after. As for the delay, maybe try just giving it more health or make it change to a super-fast locomotor when it charges the enemy? Wisdom from the great AnnihilationZH: [quote]Always mod the unit closest in [i]function[/i], not appearance, to what you have in mind.[/quote]

Posted by: Zatsupachi - Saturday, September 19, 2015 3:07:40 PM
[quote=Gameanater;138566] -snip- You probably want to base the drone off a GLA Terrorist if you're going for a $u!c!de unit and then add all the Slave code and the flying locomotor after. As for the delay, maybe try just giving it more health or make it change to a super-fast locomotor when it charges the enemy? Wisdom from the great AnnihilationZH: [quote]Always mod the unit closest in [i]function[/i], not appearance, to what you have in mind.[/quote][/quote] I did base it off a terrorist. It doesn't exactly fit well with drone code. I had it once where the drones are flying closer to the ground, they will immediately detonate as soon as they collide with their target-- it looks cool but... It looks visually messed up due to the Drone generator being way above. Besides, I wanted this thing to target Air units too.

Posted by: Gameanater - Saturday, September 19, 2015 11:02:57 PM
Darn. The limitations of ZH modding. :/

Posted by: oliver - Wednesday, September 23, 2015 5:28:28 PM
Yh, then make the projectile the drone bomb, and fire a weapon that kills itself when it fires, like a suicide weapon, use the fireweaponupdate, or something like that.