fun with objFireItemEvent
Posted: Sat Aug 02, 2008 12:08 pm
To continue with my series showing some of the potential in functions. Today we look at objFireItemEvent.
Now this code can be called every so often in the case of a item that when in a wreck destroys the wreck or when the player tries to loot the wreck for some traps.
Very nice you say? but that isn't all. Now think of a attacking system like shields down (sadly we can't use shields down exactly but I am guessing we can emulate it.)
Now there would be several ways to defend against it. One defense item would repair your armor when that event happens. A different one would get you away from there by some kind of jump system. A even different one would make the attackers shields go down also.
As you can see a great power of objFireItemEvent is that you can have different items with the same event doing different things.
Any comments? questions?
also would you like to see posts like this on older functions too?
Code: Select all
(objEnumItems ship "*" item (objFireItemEvent ship item "InWreck"))
Very nice you say? but that isn't all. Now think of a attacking system like shields down (sadly we can't use shields down exactly but I am guessing we can emulate it.)
Now there would be several ways to defend against it. One defense item would repair your armor when that event happens. A different one would get you away from there by some kind of jump system. A even different one would make the attackers shields go down also.
As you can see a great power of objFireItemEvent is that you can have different items with the same event doing different things.
Any comments? questions?
also would you like to see posts like this on older functions too?