The Klik & Play Hint Book

SpindleyQ's picture

So, hey, I was just running through the tutorial of Multimedia Fusion, which thus far pretty much seems to be Klik & Play with hopefully fewer bugs, a million more kinds of objects, the step-through editor removed, and the ability to add plug-ins, and I discovered something amazing -- in the event editor, you can simply drag actions to other conditions to copy-paste them. I thought, wow, I wish Klik & Play did that; that'd make things a lot less tedious. And then, I thought, wait, I'll bet Klik & Play does do that and I've been wasting all kinds of time recreating actions from scratch. Sure enough, Klik & Play has supported copy-paste in the event editor all along and I simply didn't know it.

What hidden Klik & Play features do YOU exploit for your own personal gain?

captaincabinets's picture

I'm sure everyone has used

I'm sure everyone has used random numbers at one point in time, but I have never found it described in the manual (yes, I have a hard copy), or in the woefully inadequate in-program help. To elucidate for those who have not yet discovered it, you can set up the condition by right-clicking the "Special" object (a spanner), then clicking "compare two general values". Then click "edit", "retrieve data from an object", then right click the "Special" object again and select "generate a random number". Et voila. Alternatively, type in random(x) for the value, where the random number you want is 0 to (x-1).

The code linked below can be

The code linked below can be adapted to have there be an equal chance of any of three possible things occurring upon an event (please ignore the 'start of level' event). It is presumably easy to add a fourth effect, and thus add even futher effects, while keeping the probabilities equal. It seems that the probability checks are resolved upwards. Does anyone here know if all events are resolved upwards?

http://img507.imageshack.us/my.php?image=threewaypv7.png

SpindleyQ's picture

I think events might be

I think events might be resolved in the order that you create them, rather than the order that they show up in the event editor? I'd love to be proven wrong on that.

It looks rather like that would only work if the action was to change frames, though. Otherwise the top one would literally always happen. Still, neat trick; setting flags to do flow control is tedious.

Danni's picture

Spambot brought me here, bumping this because of OCD

Klik processes all events in order from top to bottom. In the case of switching frames (as it seems are being used in the screenshot), the game doesn't jump to the frame you select immediately, but rather once execution reaches the bottom for the current frame, the last "jump to X frame" action that was fired wins.

Pizza Time's picture

Handy for large-scale projects with multiple contributers

As I stated in cabinet's proposal topic you can copy frames from one game to another, retaining all objects and events since each frame is self-contained.

SpindleyQ's picture

Interesting! I'd never even

Interesting! I'd never even thought to copy frames within a single game.

PenguinSeph's picture

Really? I always used to

Really? I always used to make one frame that contained all the engine code, and then just copy and pasted it and moved things around to make levels.

Here's one. You can pull sound effects and midis from the mus files that come with Stand Alone KnP games. You need never looks for midi files again ;)

SpindleyQ's picture

I noticed Six's recent

I noticed Six's recent masterpiece The Last Hanukkah pulled a neat trick for the player input -- the ship you controlled had ball movement, and every frame, it was set to look at an object whose position was set to be the same as the mouse cursor. I felt stupid for using a much harder method that didn't work as well for Pixl Klaus to make the children track Santa (incrementing the X and Y coordinate individually based on a simple less-than / greater-than comparison -- no non-45 degree angles at all).

If I ever remake my Katamari-style game that I did for the Pirate Kart and lost in a crash, that's the way I'm doing it.

kirkjerk's picture

My Learning KNP FAQ has a

My Learning KNP FAQ has a link to Steven Chan's KNP page- he then copied Eurorpess "Tip" page which has I think that tip, and some others-- first link on that page.

I wish there was a "Look Toward Direction" instead of "Look In Direction" that would allow for some gradually-turning player seeking missiles ... or zombies....

PenguinSeph's picture

There's an extentions that

There's an extentions that does exactly that for TGF and MMF (and probably MMF2 as well) called direction calculator. You could use that. TGF is still a Klik product (although it is missing the clip art :()

pensive-mosquitoes