Trouble scripting a box puzzle - Desperate plee for help

Started by magintz, Wed 02/06/2004 22:38:56

Previous topic - Next topic

magintz

Too many variables and logical sequencing for my brain to cope with. I've tried and i've tried to get this scripted so it will work.

TO best understand it I have compiled a little flash animation of how everything should work. There are 5 boxes. You need to shift them all about so you can climb to the top. Once at the top you can jump across and get to freedom.

If anyone can please help me with this puzzle I can e-mail the flash animation.

EDIT: Uploaded it to 2D adventure - http://www.2dadventure.com/ags/Puzzle.zip
When I was a little kid we had a sand box. It was a quicksand box. I was an only child... eventually.

Mr Jake


magintz

Well there are five boxes. You can move box 3 over to rest on top of box 5, and also move it back onto box 1. WHilst box 3 is on box 5 you are able to climb on top of box three. WHilst on box 3 you can climb down, or up on top of box 4.

Whilst on top of box 3 or 4 you are unable to move ANY box.

If you are on the ground and you alse move box 4 to the left, you are able to climb on top of box 2 and then onto box 3.

Does this make any sense?
When I was a little kid we had a sand box. It was a quicksand box. I was an only child... eventually.

®2-D2

took me a little but i think now i understand what you want.
but where's the actual problem? you dont know how to go about the whole thing?
here's what i'd do:
have one variable each for the 2 movable boxes (3 and 4) which holds the state of the boxes (on top of which box they currently are; i.e. "1" or "5" for box #3 and "1" and "2" for box #4).
and of course the player needs a variable which holds the box number he's standing on (while "0" means he's standing on the ground).

with that you should be able to do it, even though might be a little typing-intensive :)

magintz

yes i've tried this, i've used variables Box to set the state of the boxes, and climb for which box your are currently on top. I just cant seem to get any of it to work.

I've compiled it all into a one room test thingy to show you what it is. It is an almost exact replica of the final thing except for the charcater and gui graphics.

Hope it helps, and if anyone want to try to sort it all out for me i would appreciate it very much.

http://www.2dadventure.com/ags/Test.zip
When I was a little kid we had a sand box. It was a quicksand box. I was an only child... eventually.

Relight

I love scripting - I don't know how really good I am at it, but I love it (am I sick, or what? ;D). I might take a look when I get home if no one else gets to it.

Well I managed to load up the game (somewhat dementedly) at work, but I can't run it or run your flash file. It doesn't help when you name all the hotspots and all the objects just "box" instead of "boxX" (X being the # of the box). I'll look at the flash file and the game more when I get home.

Here's the first problem. Your description in your 2nd post of what you can do is different than the depiction of what you can do in your flash animation. But all things considered, it shouldn't be that hard to take care of. I'll try something out here.

Relight

OK, sorry, I didn't look at yours, I just scripted it. I don't know if this is exactly what you wanted, but should be close. I did it so you can move the boxes, and you can stand up to the first level. I didn't make it so you can jump up one more level. You can figure that out. Here's the source and a diagram. I imagine you can see my logic from the diagram and the source.

If you want to use GlobalInts or whatever, you can always just change around my variables and stuff.

http://www.sylpher.com/relight/download/box.zip

®2-D2

that's how i think he wanted it to be except that you also have to be able to stand on top of the two top boxes (3 and 4) but that shouldn't be a problem

magintz

yay thanks. It's going to take me some time implementing all this into my game with the lucas arts push button, and the characters and backgrounds and just customising it to fit my game, but it should work. I also need to remove the blank box 0 or at least make it invisible. My last thing I have to do is to add climbing ontop of the highest boxes.

Thanks for all your help, if I have any further problems I will ask. :)
When I was a little kid we had a sand box. It was a quicksand box. I was an only child... eventually.

Relight

Yeah, as I said, I didn't implement climbing up onto the last 2 boxes, but that should be pretty easy for you to do once you see how I did the first bit.

Oh, and yes, you can delete the blank box of course, I did it to make it easy to visualize, shouldn't need to bother with it at all.

magintz

OK, My exams have just finished and have gone to implement the climbing onto the second boxes but am slightly confuzzled as to the variables of where the characters and boxes are and what conditions should be checked to see when and where you climb to, any chance of you implementing this for me to save me a bit of time trying to figure out all this.

Thanks

If not then a helping hand would be nice to explain what is going on
When I was a little kid we had a sand box. It was a quicksand box. I was an only child... eventually.

Scorpiorus

playerposition==1 when Roger is on top of the 1st box and playerposition==3 when he is on top of the 2nd one.

magintz

thanks, i'm trying hard to get a perfik demo of this game out by the end of the month and still have a few rooms to do and to go back and correct some dialog as it all seems to not make sense.

Hopefully i'm looked at a beta by the 20th with a full release on the 27th
When I was a little kid we had a sand box. It was a quicksand box. I was an only child... eventually.

Relight

Let me know if you need more help. You have to consider each position the player could be in, each box he could click on, and each possible combination of the positioning of the boxes. It's just about being methodical really, and thinking through each possibility.

SMF spam blocked by CleanTalk