Unknown Gvar problem

Get help using Construct.

Unknown Gvar problem

Postby Katori on Sat Aug 29, 2009 7:09 pm

I have it set up currently so that every time MonthInYear = 13, (the game is turn-based with each month being a turn), it sets Year.old to Year, adds one to Year, then sets MonthInYear to one. Later I have it set so that if Year.old is different then year, it will do something. This is vital to my game. The problem is, this process only works once. I had it working earlier, but I threw a bunch of new code at it and now it doesn't work. I recreated the function twice. The months still count up properly and cycle back to 1, and the years even cycle correctly, but the functions that I have set up to do every year don't run.

What would be a better way to do this?
User avatar
Katori
 
Posts: 20
Joined: Mon Jun 08, 2009 12:16 am

Re: Unknown Gvar problem

Postby lucid on Sat Aug 29, 2009 7:48 pm

it sounds like the year old thing is unnecesary, since year.old will always equal year-1
but there's nothing about what you said that sounds like it shouldn't work
we'd need to see your code to see why it's not working
you can post a cap
or post a screenshot and black out the unrelated actions if you don't want people to see your code
Image
User avatar
lucid
 
Posts: 1459
Joined: Fri Jan 16, 2009 9:47 pm

Re: Unknown Gvar problem

Postby Katori on Sat Aug 29, 2009 8:16 pm

No it doesn't always = year - 1 because when the function is finished year.old = year.

Here's the CAP--copyright me--produced for the LD48 competition.
By the way, the code is all basically the last 24 hours, that's why it's messy. I know that. I just want to know why it doesn't work.

To see the problem, press "Nuke 'em", then press "Space" to pass turns. When "Year" goes up, the red wave of radiation is supposed to move down and a random population operation is supposed to happen. They don't.
UPDATE: I might have fixed the problem. I deleted the other qualifying arguments. Why is this happening?
UPDATE2: I think it's fixed. I'll post the CAP again if I need more help.
User avatar
Katori
 
Posts: 20
Joined: Mon Jun 08, 2009 12:16 am


 • Print view • A/a

Return to Help / Tech Support

Who is online

Users browsing this forum: R0J0hound and 5 guests