A script request thread
#1
Posted 10 February 2008 - 11:45 PM
Oh And to be able to switch boots while swimming (might need to script with it also screen data rule "disable selectable boots")
#2
Posted 11 February 2008 - 04:54 AM
A script which slows Link's walking speed, changes his tiles so his is swimming and dis-ables his items when he is certain areas (those underwater ones).
Then, when he presses 'L' (or R), he equips the boots, and can then walk and therefore use items?
Scripting screen data is impossible...
But screen specific situations aren't, so don't worry.
#3
Posted 11 February 2008 - 01:30 PM
#4
Posted 11 February 2008 - 01:32 PM
It sounds like quite a simple, but quite a fun script.
How would you have the engine detect whether Link should be swimming or not though?
Could be via a combotype or a flag or something?
#5
Posted 11 February 2008 - 01:56 PM
#6
Posted 11 February 2008 - 02:11 PM
What combotypes do you have spare?
Centre Stature or something?
#7
Posted 11 February 2008 - 02:16 PM
Edited by ennonfenom, 11 February 2008 - 02:16 PM.
#8
Posted 11 February 2008 - 02:19 PM
And there are a few combotypes that aren't really too functional, such as the 3 statue ones and a couple of others.
Have a look down the list, and pick a passive combo-type that you can afford to spare; for each screen that you use the script on, you won't be able to use that combotype.
#9
Posted 11 February 2008 - 02:21 PM
#10
Posted 11 February 2008 - 02:22 PM
#11
Posted 11 February 2008 - 02:29 PM
#12
Posted 11 February 2008 - 06:10 PM
void run(){
int x; int y; int loc;
bool bootson; int btimer;
int framedelay;
int speed = 1;
int cmbtype = 35; // 35 is centre statue, change it to something else if you want.
int boots = 0; // set here the item ID number of your boots item
int s = 0; // set here the SFX ID that you want to play when Link equips the boots.
int swimLTM = 0; // set here the item ID number of the LTM item that makes link look like he's swimming
while(true){
x = Link->X+8; y = Link->Y+8;
loc = ComboAt(x,y);
if(Link->InputL && Link->Item[boots] && btimer == 0){
Game->PlaySound(s);
bootson = !bootson;
btimer = 20;
}
if(Screen->ComboT[loc] == cmbtype){
if(!bootson){
Link->InputA = false;
Link->InputB = false;
if(!Link->Item[swimLTM]) Link->Item[swimLTM] = true;
speed = 2;
}else{
if(Link->Item[swimLTM]) Link->Item[swimLTM] = false;
speed = 1;
}
if(Link->Action != LA_FROZEN && Link->Action != LA_ATTACKING){
if(Link->InputLeft && Link->Dir == 2){
if(framedelay == speed){Link->X = Link->X+1; framedelay = 0;}
else framedelay++;
}
if(Link->InputRight && Link->Dir == 3){
if(framedelay == speed){Link->X = Link->X-1; framedelay = 0;}
else framedelay++;
}
if(Link->InputUp && Link->Dir == 0){
if(framedelay == speed){Link->Y = Link->Y+1; framedelay = 0;}
else framedelay++;
}
if(Link->InputDown && Link->Dir == 1){
if(framedelay == speed){Link->Y = Link->Y-1; framedelay = 0;}
else framedelay++;
}
}
}
if(btimer > 0) btimer --;
Waitframe();
}
}
}
Looks like I had a bit more free time than I'd anticipated.
Have a go with that and tell me what you think, I haven't actually tested to see if it works, but I have compiled it.
You'll need to set the noted (//) integers at the top, make your water combos into walkable 'Centre Statue' combos, and set this script on an ffc on the screen.
#13
Posted 11 February 2008 - 11:54 PM
#14
Posted 13 February 2008 - 05:15 PM
Edit: nope still the same, so what now?
Edited by ennonfenom, 13 February 2008 - 05:20 PM.
#15
Posted 14 February 2008 - 07:47 AM
Centre is the British spelling.
And what you have to do is make all of the tiles that Link will walk on underwater into centre statue combotypes.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users