User avatar
lodilefty
Posts: 7372
Joined: Sat Aug 11, 2007 3:27 pm
Location: Finger Lakes, NY GMT -5 US Eastern

Using the same event name in multiple events

Fri Mar 12, 2010 12:48 pm

It is common, if not essential, to use the exact same event name in several events.

It is a powerful tool, to save on text strings and to actually do a "poor man's OR" event.

Note one huge potential pitfall:
ALL of the events using a common name will have the "MaxOccurs" set to [color="Red"]the smallest value of ANY [/color]of the events.

Thus, if 5 events are named "evt_nam_test" with MaxOccurs at 999, and one event with "evt_nam_test" is set to MaxOccurs 1, then the MaxOccurs for all is 1 [this was bugging a MC event in RoP].

This is due to the way the engine keeps track of MaxOccurs and CuOccurs [you can see status of all events in the .hst files, near the end]
Always ask yourself: "Am I part of the Solution?" If you aren't, then you are part of the Problem!
[CENTER][/CENTER]
[CENTER]Visit AGEWiki - your increasingly comprehensive source for information about AGE games[/CENTER]

[CENTER]Rules for new members[/CENTER]
[CENTER]Forum Rules[/CENTER]

[CENTER]Help desk: support@slitherine.co.uk[/CENTER]

User avatar
Pocus
Posts: 24756
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Fri Mar 12, 2010 3:31 pm

why Poor Man? I find your usage of 'same name' creative!!
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

User avatar
Hobbes
Posts: 4359
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

Fri Mar 12, 2010 4:33 pm

Can you give an example of how this might be used? I would have just expected to either get an error or both events to fire?

Cheers, Chris

User avatar
Hobbes
Posts: 4359
Joined: Sat Mar 11, 2006 12:18 am
Location: UK

Fri Mar 12, 2010 4:34 pm

Aha - I suddenly get it! :)

Return to “Modding AGE engine games”

Who is online

Users browsing this forum: No registered users and 2 guests