<OnInstall> doesn't seem to get called when AutoInstalling. Possible bug?
Edit: Or not. I'm getting some weirdness here between the intAutoInstall script and <OnInstall>
<OnInstall>
- LordSutekh
- Commonwealth Pilot
- Posts: 87
- Joined: Sat Mar 20, 2010 9:36 pm
- Location: Bedlam
Code: Select all
<Invoke>
(block Nil
(intAutoInstall gSource gItem)
(shpRechargeShield gSource 125)
</Invoke>
Code: Select all
<OnInstall>
(shpRechargeShield gSource 125)
</OnInstall>
Code: Select all
<OnInstall>
(block Nil
(shpRechargeShield gSource 125)
(objSendMessage gSource Nil "I am an event that doesn't like to work")
)
</OnInstall>
-
- Developer
- Posts: 2998
- Joined: Thu Jul 24, 2003 9:53 pm
- Contact:
Are you trying to auto-install the shield and then recharge it inside of OnInstall?
I can imagine that it would fail, probably because OnInstall doesn't expect the item to be modified that way. Please write up a ticket and I'll see if I can fix it.
I can imagine that it would fail, probably because OnInstall doesn't expect the item to be modified that way. Please write up a ticket and I'll see if I can fix it.
- LordSutekh
- Commonwealth Pilot
- Posts: 87
- Joined: Sat Mar 20, 2010 9:36 pm
- Location: Bedlam
Even if I take out the auto-install, and just try to recharge it through OnInstall installing it at a station, it doesn't seem to work. It will display any message I care to script, it just won't recharge the shield. I also found an instance where trying to auto-install a damaged shield crashes the game.
- digdug
- Fleet Admiral
- Posts: 2620
- Joined: Mon Oct 29, 2007 9:23 pm
- Location: Decoding hieroglyphics on Tan-Ru-Dorem
As stated by george, OnInstall is called after the item is installed but before any bonuses and enhancements are computed. (so that you can apply enhancements)
LordSutekh, did you try to simply fire an event with, let's say, 5 ticks delay and recharge the shield in the fired event ?
That should work.
LordSutekh, did you try to simply fire an event with, let's say, 5 ticks delay and recharge the shield in the fired event ?
That should work.
- LordSutekh
- Commonwealth Pilot
- Posts: 87
- Joined: Sat Mar 20, 2010 9:36 pm
- Location: Bedlam
Hmmm, that's an idea I hadn't thought of. I'll have to try that out. But my point is that <OnInstall> doesn't act as one would logically expect it to.
-
- Developer
- Posts: 2998
- Joined: Thu Jul 24, 2003 9:53 pm
- Contact:
Agreed. If someone will write a ticket I can address it.LordSutekh wrote:Hmmm, that's an idea I hadn't thought of. I'll have to try that out. But my point is that <OnInstall> doesn't act as one would logically expect it to.
- LordSutekh
- Commonwealth Pilot
- Posts: 87
- Joined: Sat Mar 20, 2010 9:36 pm
- Location: Bedlam
Ah. Hint taken. If someone could please activate my account I'll get right on it.