I did actually mean timer not turn script.. I got them mixed up.
XanMag wrote:My solution would not to use @#$&* turn scripts at all. Maybe I interpret your intentions incorrectly, but here is what I would do.
Certainly there has to be an event that triggers a change in attributes. I'd raise flags post-event. And, remember, you can create an event at any point in your game to flag. If you are getting a mess of error messages already, it certainly would not be good down the road. Simplify it. I'm definitely not a good one to offer corrections, but whenever my game goes wonky, 99% of the time it is because I have too much s*** going on and I've over complicated my code. I usually fix it by deleting the object or script, think as simple as possible about what I want done, and restart (of course I copy-paste into word, but the point is to get rid of the garbage and restart within Quest). It almost always corrects when I do that.
I know it is not much help but it works for me.
As for the delay... I experience delays when playing other peoples games online. When it is downloaded, I NEVER get delays. Just put in the game description a suggestion to download.
Good luck and happy gaming!
XanMag
you know I think you are right, if it's already running slow now because of using a timer, I may as well remove it, I could easily have the status update every time the player enters/leaves a room, every time they do random things like speak to someone, pick up an object etc and I could of focus that around points in the game where the status is more likely to change, like when they are doing things in combat put a few update status lines in there
HaganeSteel wrote:I'm not sure what you're trying to do, but I'd wager what you're trying to do can be done more efficiently using the attributes tab, an integer, and a changed script. I don't think you'd need a turn script for that.
If you have 23 statuses, make something set this integer to a number. If "fine" is 0, then "poison" can be 1. A changed script can make the necessary changes when the integer moves from 0 to 1.
For example: We'll have 2 attributes:
player.Status
player.changedStatus
player.changedStatus will check every time player.Status changes. Let's say "fine" is 0, and "poison" is 20. It would be: player.Status = 20. Then the changedStatus script would run and say, "Oh, the player is poisoned. Better change the information on the Status window and run this turn script so he loses HP every turn now."
You shouldn't need to check every turn for every status ailment.
As for the errors, I don't know. I have occasionally gotten canAdd and Int32 errors on my game that I haven't been able to replicate. Quest has debugging tools, but they didn't tell me anything useful either.
Quest is, without a doubt, a wee bit unstable.
.
I put all my statuses in a timer, I made integer attributes for many things like health1, hunger1, fatigue1 etc, but i didnt want just numbers showing, so I made secondary attributes health, hunger, thirst etc. Then a timer with things like if player.health1 < 75 player.health = slightly injured. then < 50 moderately injured. Then for hunger and for many other things. with it checking every second it worked to update any of the players statuses whenever anything happened, but it also just didnt like it. On 10 seconds it's fine.. but I think I will remove it anyway because it might slow down again in the future with all the things I could add.
lightwriter wrote:Hmm, I get that random error sometimes too when I play my game... must be a bug in Quest.
As for the lag, I do believe just like any program it depends on your RAM... if you have a decent computer with like 8 GB of RAM then you'll experience less lag than someone who who has a computer with like 2 GB of RAM.
yeah my computer isnt the best but it's erm.. 3.9ghz quad core with 8gb ram so I know there would be people on much worse ones who could also try to play my game once it's finished and idk how much worse it'd be in that case! I found that extending how long my timers activate fixed the error for me so maybe that will solve it for you as well.