Page 1 of 1

Trying to get an ongoing task to repeatedly execute.

PostPosted: Wed Jan 30, 2019 9:17 am
by maddieface
Hi guys, I'm tinkering with a spellcasting game with a mana stat, and I'm having trouble getting the latter working. I've got it set with two variables (a maximum and a current), and I'm trying to get a task to execute each turn to check if the current mana is lower than maximum and, if so, increment it by 1. Said task is called by a repeating 1 turn event initiated from the start of the game and set to repeat on finishing. I'm reasonably sure the event is working fine (it's triggering other upkeep style tasks that are working as intended) but the mana recharge task is only ever executing once, and then never again. It is tagged as being repeatable so I don't know what gives. I'm screenshotting the three pages of the task below in case someone can point out what's wrong.

image1.png
image1.png (19.08 KiB) Viewed 399 times


image2.png
image2.png (13.61 KiB) Viewed 399 times


image3.png
image3.png (12.31 KiB) Viewed 399 times

Re: Trying to get an ongoing task to repeatedly execute.

PostPosted: Fri Feb 01, 2019 2:29 am
by R2T1
I have a similar situation (System TASK - Countdown) except my variable counts down each turn and I have no restrictions. Everything else looks the same as mine. I do have an extra tab called Advanced, which has a Task Priority of 11, Aggregate output where possible is ticked and Display completion message AFTER executing actions. (This is possibly because I have Simple Mode unchecked in the game settings.)

This is controlled from an event which is Turn Based to start immediately and lasts 1 turn and repeats on completion. It contains only 1 Sub-Event - After 1 turn from Start of Event, Run Task Countdown.

Not sure if any of that will help as there may be something else that is stopping it. You could try adding an extra sub-Event that outputs a message at the same time as the variable increments to see if is firing as expected.

Re: Trying to get an ongoing task to repeatedly execute.

PostPosted: Fri Feb 01, 2019 3:37 am
by maddieface
I got rid of and rebuilt the Magical Power variables and now it's working so I have no idea what was going on, but thanks so much for the help!