Page 1 of 1

fun with objFireItemEvent

Posted: Sat Aug 02, 2008 12:08 pm
by Betelgeuse
To continue with my series showing some of the potential in functions. Today we look at objFireItemEvent.

Code: Select all

(objEnumItems ship "*" item (objFireItemEvent ship item "InWreck")) 
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?

Posted: Sat Aug 02, 2008 11:22 pm
by F50
Sure, just make a reference topic that contains links to all of these, and then have someone put it on xelerus.

By the way, Xelerus still has (sovSetDisposition) wrong. The example makes the two sovereigns enemies, not friends.