Control launcher behavior based on type of ammo fired?

Freeform discussion about anything related to modding Transcendence.
Post Reply
TheLastBrunnenG
Commonwealth Pilot
Commonwealth Pilot
Posts: 86
Joined: Fri Dec 04, 2009 1:46 am

Is there a way to control launcher behavior based on the type of ammo fired? Specifically, the type of behavior I want to model would normally fall under the <weapon ...> tag. Problem is that with multiple ammo types, doing that would affect any ammo fired.

Let's use the Rasiermesser launcher as an example. Let's say that I want it to fire as configuration="Spread3" if it fires Gotha 400 Seekers but I want it to fire as repeating="3" if it fires Gotha 10 missiles.

I'm wondering if this is possible. Ideas?

Currently using 1.08d.
Vaiyo A-O
A Home Va Ya Ray
Vaiyo A-Rah
Jerhume Brunnen G
ImageImage
User avatar
Atarlost
Fleet Admiral
Fleet Admiral
Posts: 2391
Joined: Tue Aug 26, 2008 12:02 am

You can simulate configurations in the <onfireweapon> event. Use some sort of conditional with aWeaponType, either an if if you only have one ammo type needing special handling, or a switch if everything is funky, to determine what special stuff to do.

Use aWeaponType as your weapon UNID when creating shots unless you have multiple weapons using the same ammo, in which case you'll need a virtual weapon for each ammo type. Returning nil will fire the normal shot, which you may or may not want depending on what you're doing.
Literally is the new Figuratively
Post Reply