I'm have a bit of an idea for a grant mod to add some functionality that's not available yet, but which will likely available in the future.
The problem I'm having is that I'd like a grant to be rewarded automatically when n days have passed (or similar interval that scales with the game speed).
I know how to set objectives for grants that depend on rooms, objects, staff. Does anyone know how to set an objective based on a timer elapsing?
Grateful for any advice.
A question for the Lua lovers
Moderator: NBJeff
- paktsardines
- level5
- Posts: 1752
- Joined: Mon Oct 01, 2012 11:10 am
- Location: Australia
Causeless wrote:Hmm, this isn't a general lua question. It'd need to be some sort of function telling the in-game time, if you wanted it not to be extremely hacky.
Fair enough, but this would be a great addition to the Lua side of things. Right now you can have a grant pay up when you start it and/or when you complete it. Having it pay up after X hours would be cool too.
- paktsardines
- level5
- Posts: 1752
- Joined: Mon Oct 01, 2012 11:10 am
- Location: Australia
Hmm, this isn't a general lua question. It'd need to be some sort of function telling the in-game time, if you wanted it not to be extremely hacky.
Exactly. I could just use some sort of lua timer fuction, but then it wouldn't scale with game speed.
And just to clarify, instead of 'n days from now' I should have said 'at the start of the nth day from now', so that the grant is obtained along with the daily cash intake.
- paktsardines
- level5
- Posts: 1752
- Joined: Mon Oct 01, 2012 11:10 am
- Location: Australia
Who is online
Users browsing this forum: No registered users and 12 guests