Add AND Remove building in Event

jefmart1

Prince
Joined
Aug 16, 2005
Messages
463
I am still working on how to create temporary resources. I came up with a solution:

Event triggered by building of national wonder that is force built by a unit. Then there is a delayed event that removes said building.

Only one problem, the initial event triggers every turn, resetting the event and preventing the removal event.

So I realized if there were 2 buildings. The first built to trigger the event, and the second one to actually provide the resource, AND the first building were removed so it wouldn't trigger the initial event again. That would accomplish my objective.

However, when I tried to do that in the event it did not recognize the second building change and failed to load all of the events.

<BuildingClass>BUILDINGCLASS_FUEL</BuildingClass>
<iBuildingChange>-1</iBuildingChange>
<BuildingClass>BUILDINGCLASS_FUEL_SUPPLY</BuildingClass>
<iBuildingChange>1</iBuildingChange>

Is there another way to do this correctly?
 
Do you have ANY idea why the event is repeating every turn? Could you put up (in a spoiler tag) the piece of XML for the Events you are describing? I may be able to help. I don't think you can have two buildingchanges in one item in the XML, btw.
 
It repeats every turn because the trigger for the event was the building of the building or rather its existence.

So if the Fuel building exists, then the 1st event triggers. Which happens every turn. Thats why I want to remove that building in the event to prevent the constant triggering. The new building created would provide the resource, and then be removed by the delayed event.

Also, I set the event to recurring so that people can supply themselves multiple times.

The "easy" way around this is to have a new event ie FUEL_SUPPLY_1, FUEL_SUPPLY_2, etc; and not make it recurring. But then I'd need thousands of those events.

Can I have multiple events in one turn?

Fuel event triggered by building ->Event removing buidling->event creating new building and eventually removing it?
 
Top Bottom