CurtSibling
ENEMY ACE™
- Joined
- Aug 31, 2001
- Messages
- 29,455
@Prof. Garfield
Hi there!
I am trying to create a straightforward event that generates gold per turn if a civ has a certain tech.
I am assuming this goes in the "onTurn" section of the trigger events.
Problem is, the event is creating huge amounts of gold.
16,000 instead of 1000...
Am I doing something wildly wrong here?
Hi there!
I am trying to create a straightforward event that generates gold per turn if a civ has a certain tech.
Code:
function triggerEvents.onTurn(turn)
context[getContext()]["onTurn"](turn)
universal["onTurn"](turn)
delay.doOnTurn(turn)
legacy.onTurnEventsAndMaintenance(turn)
--If the Soviets have the "Communism" tech, the event will generate 1000 gold per turn...
if civ.hasTech(object.tRussians, object.aCommunism)
object.tRussians.money = object.tRussians.money + 1000
end
end
I am assuming this goes in the "onTurn" section of the trigger events.
Problem is, the event is creating huge amounts of gold.
16,000 instead of 1000...
Am I doing something wildly wrong here?