I'm working in 2.5.2 with the Dance of Remembrance (Hybrid) tileset. I'm posting this here because I couldn't find anything about this on the forums or in the database and I feel that it's an idea that other people would like to use in their quests.
Anyways, do you remember the floor spinners from the Oracle Series? (I'd provide a screenshot, but I haven't been able to find any.) Here are the tiles I'm using, though.

They grabbed you, spun you to a new path and made for a slightly more complex level of dungeon design. Well, a while back my brother suggested making them and I decided to accept the challenge.
However, somewhere in the process I seem to have gone awry. I'm going to be posting my script here so maybe somebody else can guide me in the right direction to make these things a reality.
Here's the script as of now.
//Floor Spinner
const int FLOOR_SPINNER_SFX = 78;
const int FLOOR_SPINNER_REST_COMBO = 29620;
const int FLOOR_SPINNER_CW_COMBO = 29622;
const int FLOOR_SPINNER_CCW_COMBO = 29621;
ffc script Floor_Spinner{
void run(bool Clockwise,int perm){
int SpinDestination;//Determines destination.
float angle;//Handles rotation.
//Controls spin phase.
bool Spinning = false;
bool HasSpun;
bool TimeStored = false;
if(!TimeStored && Screen->D[0]==0){
Screen->D[0]= TimesContinued;
TimeStored= true;
}
else{
if(Screen->D[0]!=TimesContinued){
Screen->D[0]= TimesContinued;
Screen->D[perm]= 0;
}
}
if(Screen->D[perm]==0)HasSpun = false;
else HasSpun= true;
while(true){
//First time visiting with a clockwise or already visited CCW.
if((Clockwise && !HasSpun)||(!Clockwise && HasSpun)){
///Approach from top.
if(Between(Link->X,this->X+2,this->X+(this->TileWidth*16)-2) &&
Between(Link->Y+16,this->Y+2,this->Y+8) &&
Between(Link->X+16,this->X+2,this->X+(this->TileWidth*16)-2)){
//Go to right.
SpinDestination = 1;
//Start spin phase.
Spinning = true;
}
//Approach from bottom.
else if(Between(Link->X,this->X+2,this->X+(this->TileWidth*16)-2) &&
Between(Link->Y,this->Y+24,this->Y+(this->TileHeight*16)-2) &&
Between(Link->X+16,this->X+2,this->X+(this->TileWidth*16)-2)){
//Go to left.
SpinDestination = 3;
Spinning = true;
}
//Approach from left.
else if(Between(Link->Y,this->Y+2,this->Y+(this->TileHeight*16)-2) &&
Between(Link->Y+16,this->Y+2,this->Y+(this->TileHeight*16)-2) &&
Between(Link->X+16,this->X+2,this->X+(this->TileWidth*16)-2)){
//Go to top.
SpinDestination = 0;
Spinning = true;
}
//Approach from right.
else if(Between(Link->Y,this->Y+2,this->Y+(this->TileHeight*16)-2) &&
Between(Link->Y+16,this->Y+2,this->Y+(this->TileHeight*16)-2) &&
Between(Link->X,this->X+24,this->X+(this->TileWidth*16)-2)){
//Go to bottom.
SpinDestination = 2;
Spinning = true;
}
}
//Return to clockwise or first time visited CCW.
else if((Clockwise && HasSpun)||(!Clockwise && !HasSpun)){
//Approach from top.
if(Between(Link->X,this->X+2,this->X+(this->TileWidth*16)-2) &&
Between(Link->Y+16,this->Y+2,this->Y+8) &&
Between(Link->X+16,this->X+2,this->X+(this->TileWidth*16)-2)){
//Go to left.
SpinDestination = 2;
Spinning = true;
}
//Approach from bottom.
else if(Between(Link->X,this->X+2,this->X+(this->TileWidth*16)-2) &&
Between(Link->Y,this->Y+24,this->Y+(this->TileHeight*16)-2) &&
Between(Link->X+16,this->X+2,this->X+(this->TileWidth*16)-2)){
//Go to right.
SpinDestination = 1;
Spinning = true;
}
//Approach from left.
else if(Between(Link->Y,this->Y+2,this->Y+(this->TileHeight*16)-2) &&
Between(Link->Y+16,this->Y+2,this->Y+(this->TileHeight*16)-2) &&
Between(Link->X+16,this->X+2,this->X+(this->TileWidth*16)-2)){
//Go to bottom
SpinDestination = 3;
Spinning = true;
}
//Approach from right.
else if(Between(Link->Y,this->Y+2,this->Y+(this->TileHeight*16)-2) &&
Between(Link->Y+16,this->Y+2,this->Y+(this->TileHeight*16)-2) &&
Between(Link->X,this->X+24,this->X+(this->TileWidth*16)-2)){
//Go to top.
SpinDestination = 0;
Spinning = true;
}
}
while(Spinning){
if((Clockwise && !HasSpun)||(!Clockwise && HasSpun)){
//From left to top.
if(SpinDestination ==0){
angle = 180;
while(angle<270){
this->Data= FLOOR_SPINNER_CW_COMBO;
NoAction();
angle= (angle+1)%360;
Game->PlaySound(FLOOR_SPINNER_SFX);
Link->X = (this->X+16)+ 20 * Cos(angle);
Link->Y = (this->Y+16)+ 20 * Sin(angle);
Waitframe();
}
Link->X = this->X+16;
Link->Y = this->Y-16;
if(!HasSpun){
Screen->D[perm]= 1;
HasSpun = true;
}
else if(HasSpun){
Screen->D[perm]= 0;
HasSpun = false;
}
Spinning = false;
this->Data = FLOOR_SPINNER_REST_COMBO;
}
//From top to right.
else if(SpinDestination ==1){
angle = 270;
while(angle!=0){
this->Data= FLOOR_SPINNER_CW_COMBO;
NoAction();
angle= (angle+1)%360;
Game->PlaySound(FLOOR_SPINNER_SFX);
Link->X = (this->X+16)+ 20 * Cos(angle);
Link->Y = (this->Y+16)+ 20 * Sin(angle);
Waitframe();
}
Link->X = this->X+(this->TileWidth*16);
Link->Y = this->Y+16;
if(!HasSpun){
Screen->D[perm]= 1;
HasSpun = true;
}
else if(HasSpun){
Screen->D[perm]= 0;
HasSpun = false;
}
Spinning = false;
this->Data = FLOOR_SPINNER_REST_COMBO;
}
//From right to bottom.
else if(SpinDestination ==2){
angle = 0;
while(angle<90){
this->Data= FLOOR_SPINNER_CW_COMBO;
NoAction();
angle= (angle+1)%360;
Game->PlaySound(FLOOR_SPINNER_SFX);
Link->X = (this->X+16)+ 20 * Cos(angle);
Link->Y = (this->Y+16)+ 20 * Sin(angle);
Waitframe();
}
Link->X = this->X+16;
Link->Y = this->Y+(this->TileHeight*16);
if(!HasSpun){
Screen->D[perm]= 1;
HasSpun = true;
}
else if(HasSpun){
Screen->D[perm]= 0;
HasSpun = false;
};
Spinning = false;
this->Data = FLOOR_SPINNER_REST_COMBO;
}
//From bottom to left.
else if(SpinDestination ==3){
angle = 90;
while(angle<180){
this->Data= FLOOR_SPINNER_CW_COMBO;
NoAction();
angle= (angle+1)%360;
Game->PlaySound(FLOOR_SPINNER_SFX);
Link->X = (this->X+16)+ 20 * Cos(angle);
Link->Y = (this->Y+16)+ 20 * Sin(angle);
Waitframe();
}
Link->X = this->X-16;
Link->Y = this->Y+16;
if(!HasSpun){
Screen->D[perm]= 1;
HasSpun = true;
}
else if(HasSpun){
Screen->D[perm]= 0;
HasSpun = false;
}
Spinning = false;
this->Data = FLOOR_SPINNER_REST_COMBO;
}
}
else if((Clockwise && HasSpun)||(!Clockwise && !HasSpun)){
//From right to top.
if(SpinDestination ==0){
angle = 360;
while(angle>270){
this->Data= FLOOR_SPINNER_CCW_COMBO;
NoAction();
angle= (angle-1)%360;
Game->PlaySound(FLOOR_SPINNER_SFX);
Link->X = (this->X+16)+ 20 * Cos(angle);
Link->Y = (this->Y+16)+ 20 * Sin(angle);
Waitframe();
}
Link->X = this->X+16;
Link->Y = this->Y-16;
if(!HasSpun){
Screen->D[perm]= 1;
HasSpun = true;
}
else if(HasSpun){
Screen->D[perm]= 0;
HasSpun = false;
}
Spinning = false;
this->Data = FLOOR_SPINNER_REST_COMBO;
}
//From bottom to right.
else if(SpinDestination ==1){
angle = 90;
while(angle>0){
this->Data= FLOOR_SPINNER_CCW_COMBO;
NoAction();
angle= (angle-1)%360;
Game->PlaySound(FLOOR_SPINNER_SFX);
Link->X = (this->X+16)+ 20 * Cos(angle);
Link->Y = (this->Y+16)+ 20 * Sin(angle);
Waitframe();
}
Link->X = this->X+(this->TileWidth*16);
Link->Y = this->Y+16;
if(!HasSpun){
Screen->D[perm]= 1;
HasSpun = true;
}
else if(HasSpun){
Screen->D[perm]= 0;
HasSpun = false;
}
Spinning = false;
this->Data = FLOOR_SPINNER_REST_COMBO;
}
//From top to left.
else if(SpinDestination ==2){
angle = 270;
while(angle>180){
this->Data= FLOOR_SPINNER_CCW_COMBO;
NoAction();
angle= (angle-1)%360;
Game->PlaySound(FLOOR_SPINNER_SFX);
Link->X = (this->X+16)+ 20 * Cos(angle);
Link->Y = (this->Y+16)+ 20 * Sin(angle);
Waitframe();
}
Link->X = this->X-16;
Link->Y = this->Y+16;
if(!HasSpun){
Screen->D[perm]= 1;
HasSpun = true;
}
else if(HasSpun){
Screen->D[perm]= 0;
HasSpun = false;
}
Spinning = false;
this->Data = FLOOR_SPINNER_REST_COMBO;
}
//From left to bottom
else if(SpinDestination ==3){
angle = 180;
while(angle>90){
this->Data= FLOOR_SPINNER_CCW_COMBO;
NoAction();
angle= (angle-1)%360;
Game->PlaySound(FLOOR_SPINNER_SFX);
Link->X = (this->X+16)+ 20 * Cos(angle);
Link->Y = (this->Y+16)+ 20 * Sin(angle);
Waitframe();
}
Link->X = this->X+16;
Link->Y = this->Y+(this->TileHeight*16);
if(!HasSpun){
Screen->D[perm]= 1;
HasSpun = true;
}
else if(HasSpun){
Screen->D[perm]= 0;
HasSpun = false;
}
Spinning = false;
this->Data = FLOOR_SPINNER_REST_COMBO;
}
}
Waitframe();
}
Waitframe();
}
}
}
bool Between(int loc,int greaterthan, int lessthan){
if(loc>=greaterthan && loc<=lessthan)return true;
return false;
}
These are currently designed to be 3 x 3 because of the sprites that I'm using, but they could be 2 x 2 or 4 x 4.
My thanks in advance for any assistance in making these a reality.
Edited by ywkls, 08 April 2016 - 09:04 PM.




