YolkfolkThe Dizzy Fansite 0 logged in0 playing
Community discussion

Display Score / Play Time

Started by OO7Samurai on 24 August 2022 • 708 views

9 posts
#90223

When you either die in Ko Tapu or complete the game, I'd like it to show...

You used X out of Y Items

You have been playing for Z minutes

I think this will give players a sense of progression if they die before completing, and it is very possible to complete without using all the items - so I hope it will encourage replay for players to try and do 'everything'.

Timewise, again I'd like to think this might encourage replay - and perhaps a bit of healthy competition in the forums to see who can do it fastest.

As ever - I'm not necesarily asking 'how' - but rather 'if' (it's possible) and 'whether' (there are any examples out there that might be helpful for me to disect).

(I'm pretty sure I can keep a score tally - but how to present it is my issue. When it comes to time though, I'm still struggling generally when it comes to measuring as well as displaying it).

Thanks in advance! :smile:  

 

👍 0
#90224

oh - I realise I could write 100 messages basically saying If STATUS ==1, Message 1 ("you used 1 item") If STATUS==2, Message 2 ("you used 2 Items"), etc.

But I wonder if there is a nicer way of doing it?

Ta!

👍 0
#90225

I think something like this might be what you're after.

items = GameGet(G_ITEMSUSED);
num = (str)items;
Message( "YOU USED" + num + "ITEMS" );
👍 0
#90226

@noggin-the-nog :lol:  

I managed this last night....

func ScoreScore( x, y, text, score, text2, colorink, colorborder )
{
g_msglastx = x;
g_msglasty = y;
g_msglastink = colorink;
g_msglastborder = colorborder;

x*=8; y*=8;
GamePause(1);
DialogPush();
DialogSetText("{c:0x"+(str "%x")colorink+"}"+text+score+text2);
DialogSetColor(colorborder);
DialogFitAt(x,y);
DialogRun();
GamePause(0);
}

 

func ShowScore()
{

text = (str "%02i")"You Found ";
score = (str "%02i")100; //change this to a status which counts items used
text2 = (str "%02i")" Items";
ScoreScore( 5, 5, text, score, text2, COLOR_WHITE, COLOR_RED );
}

But yours looks just a little bit neater 🤣 

Cheers!!

👍 0
#90227

Huh - and you said you weren't a coder 007 - 99% of what you and Simon have written has gone way above my head {yolkfolk}:puzzled: ...which is probably the reason why my coding is about twice the size of other peoples {yolkfolk}:cheers:  

👍 0
#90228

Nice! :tup:  

[quote data-userid="33362" data-postid="90226"]

@noggin-the-nog :lol:  

I managed this last night....

func ScoreScore( x, y, text, score, text2, colorink, colorborder )
{
g_msglastx = x;
g_msglasty = y;
g_msglastink = colorink;
g_msglastborder = colorborder;

x*=8; y*=8;
GamePause(1);
DialogPush();
DialogSetText("{c:0x"+(str "%x")colorink+"}"+text+score+text2);
DialogSetColor(colorborder);
DialogFitAt(x,y);
DialogRun();
GamePause(0);
}

 

func ShowScore()
{

text = (str "%02i")"You Found ";
score = (str "%02i")100; //change this to a status which counts items used
text2 = (str "%02i")" Items";
ScoreScore( 5, 5, text, score, text2, COLOR_WHITE, COLOR_RED );
}

But yours looks just a little bit neater 🤣 

Cheers!!

[/quote]

👍 0
#90229

@noggin-the-nog @grandad - Ha - please don't give me too much credit. I am literally typing this in my 'Ctrl C' T-shirt (my Kids used to have Ctrl V versions)...and that's all that was - copy and pasted the 'message' function, and a little bit of the Cherry counter - I don't actually get what most of it does, but it's getting towards what I'm after....so just standing on the shoulders of giants again I'm afraid!

👍 0
#90255

Some of my later games implemented a timer, and some of them a score too.

I can't remember exactly how, but the score will just have added x to a variable each time I wanted it to, for example collecting a coin.

👍 1
#90330

@paperballpark Acually your Rail Road Dizzy timer was one of my primary sources in backwards engineering a way of doing the timer in Ko Tapu - so many thanks to you!!

👍 0