In onDamageArmor is aArmorSeg an item struct or the number of the armor segment?
Does sysCreateWeaponFire take a missile in the weapon UNID?
Does sysCreateWeaponFire return the shot if the weapons onFireWeapon return a nil? (assuming RC5)
weapon script questions
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
Crying is not a proper retort!
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
bonus question
When sysFireWeapon fires a weapon that has onFireWeapon does it return what onFireWeapon returns (if not nil) and if not would that be reasonable to ask for in a ticket?
When sysFireWeapon fires a weapon that has onFireWeapon does it return what onFireWeapon returns (if not nil) and if not would that be reasonable to ask for in a ticket?
Crying is not a proper retort!
-
- Developer
- Posts: 2998
- Joined: Thu Jul 24, 2003 9:53 pm
- Contact:
aArmorSeg is the number of the armor segment.Betelgeuse wrote:In onDamageArmor is aArmorSeg an item struct or the number of the armor segment?
Does sysCreateWeaponFire take a missile in the weapon UNID?
Does sysCreateWeaponFire return the shot if the weapons onFireWeapon return a nil? (assuming RC5)
sysCreateWeaponFire, unfortunately, does not take a missile as an UNID--but it sounds like a good (and relatively easy) feature request (though probably not for 1.0, since that's almost done).
Unfortunately, sysCreateWeaponFire does not call OnFireWeapon. sysCreateWeaponFire is supposed to be called from OnFireWeapon.
-
- Developer
- Posts: 2998
- Joined: Thu Jul 24, 2003 9:53 pm
- Contact:
Just out of curiosity, why do you need sysCreateWeaponFire to call OnFireWeapon? If you are running script, then you can do everything you want. Why rely on code inside OnFireWeapon?Betelgeuse wrote:bonus question
When sysFireWeapon fires a weapon that has onFireWeapon does it return what onFireWeapon returns (if not nil) and if not would that be reasonable to ask for in a ticket?
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
the reason I asked is because I didn't know one way or the other. But it isn't a problem as we can call objFireItemEvent. (assuming you can call onFireWeapon with that)
Other than the missile thing these questions where more asking how you implemented it so I can work with that as I thought of ways of doing them in ether case (that is did or did not call the event).
Just to be clear when using sysCreateWeaponFire on a weapon with onFireWeapon it fires it normally ignoring onFireWeapon?
edit: just to answer your question I want to have all weapons have onFireWeapon and I want to avoid doubling the amount of weapons.
Other than the missile thing these questions where more asking how you implemented it so I can work with that as I thought of ways of doing them in ether case (that is did or did not call the event).
Just to be clear when using sysCreateWeaponFire on a weapon with onFireWeapon it fires it normally ignoring onFireWeapon?
edit: just to answer your question I want to have all weapons have onFireWeapon and I want to avoid doubling the amount of weapons.
Crying is not a proper retort!
-
- Developer
- Posts: 2998
- Joined: Thu Jul 24, 2003 9:53 pm
- Contact:
Yes, sysCreateWeaponFire just creates the shot used by the given weapon (note, for example, that it doesn't honor dual shot weapons--because you can do that yourself).Betelgeuse wrote:the reason I asked is because I didn't know one way or the other. But it isn't a problem as we can call objFireItemEvent. (assuming you can call onFireWeapon with that)
Other than the missile thing these questions where more asking how you implemented it so I can work with that as I thought of ways of doing them in ether case (that is did or did not call the event).
Just to be clear when using sysCreateWeaponFire on a weapon with onFireWeapon it fires it normally ignoring onFireWeapon?
edit: just to answer your question I want to have all weapons have onFireWeapon and I want to avoid doubling the amount of weapons.
So sysCreateWeaponFire does not call OnFireWeapon. And you're right, you can just use objFireItemEvent to call OnFireWeapon if you want to do that.