Posted by: tomeister - Wednesday, March 28, 2012 11:18:21 AM
Under a weapon there is FireOCL. I understand this fires it from the actual weapon. So would it be possible to make it fire an OCL that kills itself?
Thanks for all your help by the way.
Ps- there are no examples of this in the game, before someone tells me to check.
Posted by: tomeister - Wednesday, March 28, 2012 9:25:48 PM
Basically, I want the unit to comit suicide once it fired its weapon;)
Posted by: precision_bomber - Wednesday, March 28, 2012 9:36:48 PM
You can do it the sneaky way by having the weapon do a 'DamageDealthAtSelfPosition'.
Though it wouldn't kill it all the time.
Or.
You can use any type of OCL for FireOCL.
The OCL for the unit to commit suicide would be hard to make.
You could though, make a weapon object the has a 'LifetimeUpdate' that expires instantaneously, and a 'FireWeaponWhenDead' ModuleTag.
The 'FireWeaponWhenDead' ModuleTag should have an invisible weapon that causes damage around itself(Like a carpet bomb).
Then you can make your OCL(more likely a CreateObject one) for it.
Posted by: tomeister - Thursday, March 29, 2012 6:11:51 AM
Thanks, that's it;)
Posted by: tomeister - Monday, April 9, 2012 1:08:42 PM
Strangely, this all seems to work on some units like dozers, but when I try teleporting a building- my SDI cannon, te new object is created, but the weapon fired to kill itself does not kill itself. Do you know why it behaves like that?