Lot of puzzles in mind but how to do them?

Started by Gabarts, Tue 26/06/2012 15:24:12

Previous topic - Next topic

Gabarts

Let's take for example the famous distraction trick:

Monkey Island:

-You ask something to the old dealer and then you can follow him/search around for some items while is out

Indiana Jones:

In the Zeppelin the pianist start playing and the radio man leaves the room (you can do something in a variable time otherwise the man catch you)

You need some advanced functions or I can start with something easier? Any help appreciated :)

Crimson Wizard

Well, obviously there is no single function that would magically put distraction puzzle in your game (although that is unfortunate :)).

I'll try to give some advice.
First, you should break the scene you want to implement into set of basic actions. I mean, write this on paper, like:

1. Character speaks to the old dealer;
2. If character sais the right thing, old dealer gets away.
3. Count X seconds till dealer returns.
4. When X seconds pass, make dealer come back and stand on his place.
5. If the character tries to steal something while dealer is on his place, then dealer warns him or something.
6. If character tries to steal while dealer is in the back room, he succeeds.

You see, you should think similar way when you implement puzzles.
Now, when you have a set of actions and events, think how you will make every one of them one by one.
You should perhaps learn, how to make characters move, talk, etc first; make some basic experiments.
If there's something you can't figure out, then ask again :)

Khris

The second one is easy, just use a timer. Look up SetTimer and IsTimerExpired.

Following the dealer is a bit harder.
Basically, the game must keep track of which rooms the dealer will cross.
In the shop, the sequence is started by the dealer leaving the room. A variable is set to the next room the dealer will cross, in this case the street outside the shop. In on_event/EntersBeforeFadein (the function which is called each time a room is entered), the game should now check if the current room is the next one on the dealer's path.
If it isn't, the player diverted from the path, lost the dealer and can't follow him any longer.
If it is, the game looks up the starting coordinates of the dealer (the middle of the street), places him there and sends them to the next exit. Then the next room variable is changed to the subsequent room the dealer will cross.
The room is faded in now and the player will see the dealer walk off towards the next room exit.

You'll also need to make the dealer disappear when they reached the exit. This can be done with room_RepExec.
Another thing to add would be a distance check so the dealer notices if you follow them too closely.

Crimson Wizard

Lol, I possibly was thinking of rather beginner's problem :D sorry if I misunderstood what kind of advice you actually needed, Gabarts.

Gabarts

Oh, thank u for these advices... Yeah, that one Khris is a bit hard to figure out by myself :)
Ok, for now is just fine to solve basic distractions puzzle, and SetTimer was the right thing I was thinking of, some Desming videos show that well. That one of the old dealer with Guybrush following to reach the "Sword Master" (lol, I forgot her name  :-\) area is one of the coolest in the all game (also the Grog puzzle one).

The method of step by step helps a lot in fact, maybe using basic actions first and then try to switch to some complex ones.

SMF spam blocked by CleanTalk