PDA

View Full Version : Gravity in sideview areas



_L_
10-01-2006, 06:02 AM
EDIT: Obsolete! Sorry, but this script is of no use to you now.

Mario and Metroid quest makers rejoice! Sideview gameplay is now more feasable than ever!

With this script, Link (and currently only Link) will fall toward the bottom of the screen. If there is an unwalkable combo in the way, Link will come to rest on it. Link can jump toward the top of the screen to advance to higher platforms.

ZScript code. (http://www.greyfire.org/~l/Gravity.z) Attach this to a screen's FFC to enable gravity in that room.

Sample quest. (http://www.greyfire.org/~l/Gravity.qst) B button to jump.

Change the jumping/falling physics by altering the three arguments (and by artificially increasing Link's walking speed.)

zeldafan500
10-01-2006, 09:55 AM
The quest wont open, it sais 'Zelda-W has encountered a problem and needs to close' whenever i try to open it.
and if i try to load the scriopt in Zquest it sais 'unable to phrase instruction 1 from script the error returned was invaled instruction the command was (gravity) (,in sidescrolling)
O_o what is this supposed to mean?

Master_of_Power
10-01-2006, 10:52 AM
Requires a file called STD.zh which comes with beta 14.

zeldafan500
10-01-2006, 11:04 AM
I just got beta14 and it still sais the same exact thing.

WindStrike
10-01-2006, 12:05 PM
... wow... this is purely awesome.
I just tried it, and although you might be able to pull off one or two bugs, they're too minor to matter in anyways really. Now you really could make the Adventure of Link quest!

Know what was freaking cool though? I jumped and did a downstab (Errr, downslash rather) on the wizzrobe. That was freaking awesome!

Best script ever made up to date. Hmm... I wonder if you could pull off random encounters using scripting? That'd be enough for a FF/Zelda style quest!

zeldafan500
10-01-2006, 12:10 PM
Please tell me how you got it to work! It doesnt work for me, even with beta14. How did you get it to work?

Mega Link
10-01-2006, 05:28 PM
How do you change the button to press to jump? I want it so you press up to jump.

_L_
10-01-2006, 11:01 PM
Please tell me how you got it to work! It doesnt work for me, even with beta14. How did you get it to work?

Here's how to load the script up in ZQuest:

* You don't use "Import FFC script". You use "Compile ZScript".
* If you're using OS X ZC, you need to store std.zh in the package itself.Right-click ZQuest, choose "Show Package Contents", and then copy-paste the std.zh file into the window (dragging won't work.)

zeldafan500
10-02-2006, 06:49 AM
(im using windows) Ok i did that now how do i actually make it work? It still plays like it does without the script.

_L_
10-02-2006, 07:08 AM
Ahhh...

...not to insult your intelligence or anything, but each room of your quest must have an FFC with that script assigned to it.

(Either that, or make an FFC in the starting room with that script and the Carry Over bit.)

EDIT: Oh, yeah, you need to set the initial arguments for the FFCs. I used 0.3 for d0, 3 for d1 and 5 for d2.

bigjoe
10-02-2006, 03:57 PM
Having a little bit of fun with this script :D

http://i113.photobucket.com/albums/n212/BigJoe_013/zelda002.png

http://i113.photobucket.com/albums/n212/BigJoe_013/zelda003.png

http://i113.photobucket.com/albums/n212/BigJoe_013/zelda004.png

Do you plan to make any improvements to the script as scripting becomes more advanced?

Master_of_Power
10-02-2006, 05:05 PM
when the item editor is finished, what I'd like is have that the A button be the jump button and have the sword as a B button item. That way you don't have to sacrefice any item and still could jump.

zeldafan500
10-02-2006, 05:11 PM
How do you assign the script to a screen? I canr figure out how to (i really must be retarded).

Dark Nation
10-02-2006, 08:59 PM
_L_, you *do* realize that since you are a ZC Dev now and have proven that jump code is possible, people are going to start bugging you for the Roc's Feather. :p

Also, bigjoe, your last screenshot, is that a custom subscreen or a bug?

bigjoe
10-02-2006, 09:15 PM
Custom subscreen. I figured that since the B button was for jumping that it would be silly to use items simultaneously. Thus, that eliminates the need for a B Button item viewer. If there were only a way to Jump AND use items seperate from eachother....Up button MIGHT work but it makes Link face upward

cbailey78
10-03-2006, 01:17 AM
Please tell me how you got it to work! It doesnt work for me, even with beta14. How did you get it to work?

I get the same thing too! The sample quest worked and I tried everything and checked everything and it won't work on my own quest. whoever made this sample quest must have MAGIC HANDS!

EDIT: OH NEVERMIND! :D I found out why. It's because you have to pick a combo in the FF Combo attributes and find the combo that is solid clear tile. Not the very first combo because it is reserved as "None".

*b*
10-03-2006, 03:02 PM
The shit you programmer types come up with is simply amazing

Now, what about top-down areas? Are you possibly working on a script/scripts for that? I'd imagine getting that down would be a little tricky, especially for stuff like jumping over otherwise unwalkable obstacles/pits

Saffith
10-03-2006, 10:27 PM
topDownJumping.qst (deleted)
TopDownJumper.z (deleted)
jump.wav (deleted)
land.wav (deleted)

It could be improved upon (it could see if you actually have the flippers, for one thing), but it's a start.
If you want to play around with it, it shouldn't be much different from _L_'s. Just be sure to set the "Draw Over" flag, set up the combos properly, and give it the right arguments.
You'll notice each screen in the demo has one of the corners covered by layer 3. That's where Link actually is when you jump; the one you see is just the FFC. That's what the arguments are for: they're the X and Y coordinates of where to stash him.

(Edit: There. Slightly less buggy.)
(Edit 2: Slightly less buggy still. I laugh at your pathetic attempt to complete a download!)
(Edit 3: Added shadow and slower diagonal movement. Didn't change solidity checking to match, though. Is Boolean XOR not working? Wouldn't compile - accused me of trying to cast bools to floats.)

The_Amaster
10-04-2006, 07:11 AM
Is there any way a Dev could intigrate the sidescroll script with ZC, so that it's a standard room-type checkbox? Only this is a great feature, and it should go in the next version if all the bugs are worked out.

Dark Nation
10-04-2006, 08:22 AM
:eek: Wow.

Dart Zaidyer
10-04-2006, 09:28 AM
Hmm, this is pretty good! Just some quick questions:

Would it be possible to attach Saffith's script as an item script, making it really a Roc's Feather?
Could the sidescroller script be modified to hide Link (but not actually stash him in a corner of the screen somewhere) and display an animation for him jumping or being in mid-air? This would be extremely useful for a Metroid-style implementation.

DarkDragon
10-04-2006, 09:45 AM
Saffith, there is currently no boolean XOR; the XOR operator (^) performs a bitwise XOR.

ShadowTiger
10-04-2006, 09:58 AM
A very, very, very, very, very, very (etc) minor upgrade to Saffith's Top Down jump script. I opened it up and replaced the .. er .. something something "B" with .. the something something "R" ... and now Link can use the bombs and the Moblins drop. So yeah, "R" jumps instead of "B" which now lets you use any item you want.

... Wow, that's so petty relative to Saffith's and _L_'s amazing scripts. XD

I wonder what else can be done with this. I'm so seriously looking into setting up this script to tie it to an item instead of the "R" key, ...

Or better yet, I should go craft a screen mockup of the "Extra Button" DN and I spoke about a month ago, where you can tack an extra button into ZC that doesn't actually DO anything unless you set a script to use it. It'd just be like an A or B button, but unless there's a script attached to it, it won't be used at all.

I'm sure that'd be pretty easy for the devs to do, right? There's already an InputA and InputB and R and L button, eh? Why not an InputC portion to the code? Add in a third button to the Key Config area in ZC, ... ...

The_Amaster
10-04-2006, 07:10 PM
Ummm.I'm prety sure I set it up just like in the example, but for some reason, if you press sideways in mid jump, Link stops falling and walks sideways. What am I doing wrong?

bigjoe
10-04-2006, 09:31 PM
I got the same problem as Amaster42 so I just took the actual gravity quest and modified it.

By the way, Saffith, do you want to seperate your example into another thread? Right now its hidden away in this thread so some people might not be able to find it.

*b*
10-04-2006, 11:02 PM
If you jump diagonally (up and left) into the trees, it'll make Link swim, but moving in another direction will make it work normally

Now you just need a splash sound and a splash animation when you jump into water and shallow water

[edit] Also, when you get a clock, Link stops flashing while in midair, and returns to his normal colors

Saffith
10-05-2006, 01:35 AM
Yeah, it's certainly a bit buggy. I'll see if I can't improve it a bit in the next few days. There are a lot of problems that just can't be fixed right now, though, or at least not very well.


By the way, Saffith, do you want to seperate your example into another thread? Right now its hidden away in this thread so some people might not be able to find it.Nah. Thanks, but it's all right for now.

Hot Water Music
10-05-2006, 06:17 PM
This is genius!

The SFX is loud though..

This reminds me of Graal's coding for their gravity mode.


Edit: OMG that roc's feather demonstation quest is awesome! HOLY ****!

Mega Link
10-08-2006, 08:33 AM
How do you change the button to press to jump? I want it so you press up to jump.
Well?

Limzo
10-08-2006, 09:38 AM
In the code, there is something that says something like "PressB" or something like that. Change B to whatever you want.

WindStrike
10-08-2006, 10:57 AM
Personally, I'd change it to space bar, since I'd probably not use the map much in any of the quests that I play. In the up-down thing that Saffith released, when you pressed B even after obtaining bombs, it didn't drop a thing, so I'm guessing the map won't appear if it was changed to space bar.

cbailey78
10-13-2006, 07:26 PM
It would be neat if we were able to have free scrolling with the gravity like mario.

Limzo
10-14-2006, 03:26 AM
It would be neat if we were able to have free scrolling with the gravity like mario.

That's exactly the same reason why we don't have ALTTP scrolling, it's just not possible yet.

The_Amaster
10-14-2006, 09:54 AM
Wel just wondering, is it possible to split the script, and make a global/screen one that enacts gravity, and assign the jumping script to an item. I mean, that could be a Roc's feather. Oh, and are there any ideas to help the slowdown that happens when Link jumps?

eXodus
11-03-2006, 04:31 AM
There is a slight problem with _L_'s script that it would be a good idea to resolve - if only to find out why it's happening in the first place. If you use the Hookshot to grapple upwards, you can slowly winch yourself up the the hook point. The problem is that you sometimes get stuck at the top instead of releasing once Link hits the grid square.

Hooking to the side, while horribly unpredictable, doesn't appear to have this bug. I think it might be not unlike the old problems with conveyers and not entirely reaching the grid square. Is it possible to check if you're grappling and (most importantly) enforce the collision detection from the script?

Master_of_Power
12-28-2006, 12:32 PM
Just because this script is obsolete doesn't mean people won't use it. This lets you set the jump height. Something I need right now. I don't plan on using the Roc's Feather in my quest, but rather, let you jump from the begining and I'd really like this script again.

C-Dawg
12-28-2006, 10:40 PM
Just go check out my post over in the Zquest Developer's forum. I'm improving on _L_'s jump script for general use.

bluedeath
01-02-2007, 03:56 PM
I am trying to side scroller gravity script and it is not compiling this is what happens
Pass 1: parsing
Line 2: Syntax error, unexpected LT, expecting $ end, on token <
fatal error Poo: cant open or parse input file