VGK here, and I have a request for all you scripters out there.
I have no experience with scripting, and I needed someone to help me make a script for an item (i.e. Roc's Feather LV2) that will allow Link to jump once, then again in midair. Both jumps could be the same height, maybe the second one could be half or three quarters height. I wouldn't really know how to go about this, although I do plan to learn scripting.
Thanks for the help.
Double Jump
Started by
VideoGameKraz
, Jun 05 2009 11:27 AM
4 replies to this topic
#1
Posted 05 June 2009 - 11:27 AM
#2
Posted 16 June 2009 - 02:42 AM
Okie Dokie Artichokieeee...ahem.sorry.
Give this a shot.
const int FALSE = 0;const int TRUE = 1;
int height = 5; // adjust this
int dj=0;
item script djump{
void run(){
if(Link->Z=0){dj =FALSE;Link->Jump = height;}
else if ( !dj )
{ Link->Jump = height; dj =TRUE; }
}}
Give this a shot.
CODE
const int FALSE = 0;const int TRUE = 1;
int height = 5; // adjust this
int dj=0;
item script djump{
void run(){
if(Link->Z=0){dj =FALSE;Link->Jump = height;}
else if ( !dj )
{ Link->Jump = height; dj =TRUE; }
}}
Edited by Gleeok, 16 June 2009 - 02:43 AM.
#3
Posted 16 June 2009 - 04:10 AM
Tut tut Gleeok, 'if(Link->Z=0)'?
And that script looks disgusting, can't you just use a bool?
'!dj' will give you a compiler warning too; this isn't C++ you know.
EDIT:
Oh, and 5's a pretty excessive value to set Link's jump to.
EDIT2:
And for that script to work, you have to use the item while Link's on the floor each time after you jump, which isn't exactly desirable...
And that script looks disgusting, can't you just use a bool?
'!dj' will give you a compiler warning too; this isn't C++ you know.
EDIT:
Oh, and 5's a pretty excessive value to set Link's jump to.
EDIT2:
And for that script to work, you have to use the item while Link's on the floor each time after you jump, which isn't exactly desirable...
#4
Posted 19 June 2009 - 05:44 AM
jeez dude, alright, alright.
CODE
int height = 3; // adjust this
bool dj;
item script djump{
void run(){
if(Link->Z==0 || Link->Jump == 0){dj =false;Link->Jump = height;}
else if ( !dj )
{ Link->Jump = height; dj =true; }
}}
I don't see why that shouldn't work.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users