The Daily Click ::. Forums ::. Klik Coding Help ::. Passing variables between frames in KNP
 

Post Reply  Post Oekaki 
 

Posted By Message

Platypus Cider



Registered
  02/02/2005
Points
  2
2nd February, 2005 at 15:28:39 -

Hello all, total newb here. I know you might want to flame the hell out of me for this, but in my defence I did spend a good.. oh.. 15 minutes searching the archives for the info I wanted

Anyway, my super newbie question is to do with 'global' variables. Specifically, is there any way to get Klick and Play to remember a given value assigned in level one, so that it can be used in level two? At present the only way this is working for me is by using the player 1-4 'scores' and 'number of lives' variables, but that leaves me with a rather underwhelming 8 variables to play with.

Apologies if this topic has been done to death. Cheers for any info anyone can provide.

 
n/a

Joe.H

Evil Faker

Registered
  19/08/2002
Points
  3305
2nd February, 2005 at 15:37:15 -

does knp have global values? if so, use them.

 
My signature is never too big!!!

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
2nd February, 2005 at 15:39:04 -

I'm afraid, with K&P you don't get global variables so you'll have to make do with lives and scores. An alternative way would be to get TGF or MMF

 
n/a

Platypus Cider



Registered
  02/02/2005
Points
  2
2nd February, 2005 at 15:42:08 -

Egads, man! But that would cost money!

Seriously, though, thanks a lot for the clarification. I might have a look at getting that Games Factory do-hicky.

 
n/a

The Chris Street

Administrator
Unspeakably Lazy Admin

Registered
  14/05/2002
Points
  48487

Game of the Week WinnerClickzine StaffAcoders MemberKlikCast StarVIP MemberPicture Me This Round 35 Winner!Second GOTW AwardYou've Been Circy'd!Picture Me This Round 38 Winner!GOTM December Third Place!!
I am an April FoolKliktober Special Award Tag
2nd February, 2005 at 16:17:54 -

I can't remember if K&P has the INI object... if it does, save the values in an ini file and load them in the next frame

 
n/a

Kris

Possibly Insane

Registered
  17/05/2002
Points
  2017
2nd February, 2005 at 16:19:24 -

hell no

 
"Say you're hanging from a huge cliff at the top of mt. everest and a guy comes along and says he'll save you, and proceeds to throw religious pamphlets at you while simultaniously giving a sermon." - Dustin G

Hagar

Administrator
Old klik fart

Registered
  20/02/2002
Points
  1692

You've Been Circy'd!Teddy Bear
2nd February, 2005 at 16:40:55 -

Circy do you remember knp at all?

the only way to do this is to use lives and scores as clickmaster said but having KNP means that scrolling games are pretty much impossible to make to any decent standard...

 
n/a

Tigerworks

Klik Legend

Registered
  15/01/2002
Points
  3882
2nd February, 2005 at 17:35:56 -

OK, how old is KNP? 12 years old? Get MMF, it's much newer and better. What's wrong with paying for quality software?

 
- Tigerworks

RapidFlash

Savior of the Universe

Registered
  14/05/2002
Points
  2712
2nd February, 2005 at 20:07:00 -

K&P was released in September 1994.

 
http://www.klik-me.com

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
2nd February, 2005 at 22:09:51 -

Well I never used KnP because it was released when I was 4, & I didnt get a PC until I was 10 & even then it was the family computer & right about now, I'm concidered a virus to the PC because everytime I get on it, I end up screwing the thing up. Its weak.

 
http://www.facebook.com/truediamondgame

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
2nd February, 2005 at 23:36:06 -

Does KNP have a mod function or any kind of string manipulation? If so you could fit as many values in the score or lives as you need.
It probably doesn't, though.
In which case you could probably code modulus calculation, but I'm sure that's more effort than it's worth. Not that I can remember how anyway.

 
n/a

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
3rd February, 2005 at 00:07:43 -

I bought KNP for $11 AU at Myers, I must of been between 8 and 10. I then bought MMF when I was about 12. Anyway back to your problem. You are not a total noob. All we ask here at TDC is that you use the Search function, which you did and we thank you.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Teapot

Does he even go here

Registered
  02/10/2003
Points
  2631

VIP Member
3rd February, 2005 at 00:56:53 -

There are lots of ways to obtain a legal and free copy of TGF. Heaps of magazines have had it on cd over the years.

 
n/a

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
3rd February, 2005 at 06:28:34 -

Really?
Probably just English mags.

 
Old member (~2004-2007).

The Chris Street

Administrator
Unspeakably Lazy Admin

Registered
  14/05/2002
Points
  48487

Game of the Week WinnerClickzine StaffAcoders MemberKlikCast StarVIP MemberPicture Me This Round 35 Winner!Second GOTW AwardYou've Been Circy'd!Picture Me This Round 38 Winner!GOTM December Third Place!!
I am an April FoolKliktober Special Award Tag
3rd February, 2005 at 15:11:25 -

Haha, well I got K&P in about '94, then TGF in '96 and prompty discarded K&P. So thats eight years of trying to remember what features it had... or didn't. I DO remember that there were only three alterable values though... I think.

 
n/a

Long John Kickbag



Registered
  26/08/2002
Points
  148
3rd February, 2005 at 16:17:24 -

Modulus is easy to code, just keep subtracting while the value is greater than the value you're doing it by. Or another way is to divide the number by the value, then multiple again (that's assuming an integer calculation takes place) and take that away from the original value.

 
Resize! - www.clicksplat.com/comparison.html

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
3rd February, 2005 at 16:54:14 -

Well, there you go. I can fit in waaaaaay more than three values then. You just have to know how many digits they'll be beforehand.
Unless you used one value to store the list of numbers and the other one to store the list of lengths.
Sounds like something I'd do an example for if I weren't, like, not going to.

 
n/a

Weston L



Registered
  16/12/2002
Points
  1603
3rd February, 2005 at 19:04:12 -

for what it's worth, i'd go with TGF but that might just be because im used to it. i have MMF too.

 
n/a

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
3rd February, 2005 at 19:15:32 -

There is no excuse why no one here at DC should have to use KnP, only because TGF Pro is no more then a standerd PS2 game! So rather then going out & buying Jak2, get TGF Pro! Now MMF is a slightly different story, but still, its not that big of a deal.

 
http://www.facebook.com/truediamondgame

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
3rd February, 2005 at 22:13:42 -

Phizzy, I'm not sure if you got the point or not, but that wasnt it. The point is, TGFPro is cheap & werth the price, there should be no reasion why not every clicker has it if they dont already have MMF.

 
http://www.facebook.com/truediamondgame

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
5th February, 2005 at 07:50:32 -

K&P had very few objects; counters; actives; backdrop; quick backdrop; lives; score; string, i think thats it

 
n/a

Al



Registered
  03/01/2002
Points
  110
5th February, 2005 at 09:02:03 -

Get TGF, its only £15 on the Clickteam site, I've also seen TGF on the Xplosiv budget range here in England for £5 before.

 
n/a

Flava



Registered
  30/07/2002
Points
  684

Has Donated, Thank You!Code MonkeyVIP MemberThe Cake is a LieThe Spinster
5th February, 2005 at 12:05:40 -

Yeh I bought TGF on one of those Xplosiv range things for £5 at Toys R US - only about 6-8 months ago too.

GO GO GO!!

 
This is a signature. Have this one on me.

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
5th February, 2005 at 14:29:05 -

Oh, i forgot, K&P also had the crappy Q&A object, not that it matters

 
n/a

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
5th February, 2005 at 14:59:50 -

Object list in KnP

Score
Lives
Active object
Background
Quick Background.

And that's it, well as far as I can remember.
but no way to save, no scrolling, it's pretty limited.

@Radix - String manipulation? KnP doesn't even have a negate function.

 
Craps, I'm an old man!

RapidFlash

Savior of the Universe

Registered
  14/05/2002
Points
  2712
5th February, 2005 at 21:41:21 -

Shab: You can scroll, but it's pretty inefficient. It requires using active objects as platforms and moving them when the player moves.

 
http://www.klik-me.com

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
6th February, 2005 at 11:47:21 -

"TGF on the Xplosiv budget range here in England for £5 before."

i got mine for £10 but that was in 'Game', ive also seen it in some other places.

 
.

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
6th February, 2005 at 18:48:07 -

Shab: I didn't expect it to have string manipulation. But a mod function can do exactly the same thing for the purpose of passing variables around.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click