Very cool! I was just about to call it a night, but now I need to take this out for a spin. Thanks Tlaero! Yet another feature I wanted badly, but didn't even know it!tlaero wrote:I just uploaded a new version of AC.
--snip--
The main change is I added filtering for game view. Say you've got a billion files <cough>Wolf</cough> and you want GameView to show you a subset of them. Or, say you want to show every file with a varPlus1 in it. Etc.
str = "Your current score is " + score;
outputString(str)
str = "Day" + dayNumber + ", " + dayName + ", Time" + timeNumber;
outputString(str)
if (day == 1)
{
dayName = "Monday";
}
else if (day == 2)
{
dayName = "Tuesday";
}
else if (day == 3)
{
dayName = "Wednesday";
}
....
else if (day == 6)
{
dayName = "Saturday";
}
else
{
dayName = "Sunday";
}
Wolfschadowe wrote:One, maybe two places.
First, if you need them, you will want to fill in the days I skipped, Thursday and Friday.
The other problem is that it is case sensitive. Day does not equal day. change Day to lowercase day for the variable name. Leave the capatalized "Day" in the readVar("Day"); alone.
function calcDayD() should start
var day = readVar("Day");
or...you could change all the lowercase day entries in the if/else if/if to be capatalized Day. I'm lazy, so I'd just make the single change.
Wolfschadowe
while (day > 7)
{
day = day - 7;
}
Wolfschadowe wrote:I'm not really a coding expert, but I would probably add this to the beginning for the function just before the first if statement:this will check the day value, and if it is greater than 7, it will subtract 7. So it will change Day 14 to Day 7 (14 - 7 = 7), and Day 8 to Day 1 (8-7 = 1). If the day is day 16, it will do it twice (16 - 7 = 9) then (9 - 7 = 2).
- Code: Select all
while (day > 7)
{
day = day - 7;
}
This keeps subtracting seven from the day until the day is 1-7.
Wolfschadowe.
I'm glad I could help.Dakutis wrote:Yes it working, coolyou save me from few hundrends code lines.
Now very difficult task. In my game all important stats is in the top of every page (like Day , time, money and few more) but I want that player could see and others stats (I can't put all in main line with others because they all don't fit in one line, and I can give him more than one line. So I want to create stats page and some stats put there. Question - how do that. What I need to write in _game.js and in that new page?
Return to The workshop of creators
Users browsing this forum: No registered users and 2 guests