19.May.2012
Choose your Language:

englisch english deutsch Schweiz Österreich

change only:
System messages, buttons, formulars, etc.

Willkommen bei
Mudvayne's deutschsprachigen Quests

Eine Seite für Zeldaclassic Freaks, die auch auf deutsch diskutieren und deutschsprachige Quests genießen wollen!
Ich hoffe, euch Zeldaclassic ein wenig näher bringen zu können.
Es erwarten euch eine Menge Spass, Spielfreude, Puzzles und Vieles mehr.
>  Home > Forum > Zelda Classic - Development, Programmierung > ZScript > ZScriptcodes > Flying spline enemy killable by hookshot-Fliegender Spline Gegner tötbar mit hookshot
Users
Hallo Gast
IP-Adresse: 38.107.179.210

Benutzername
Passwort
OnLine
38.107.x.x
58.23.x.x
38.107.x.x
38.107.x.x
38.107.x.x
38.107.x.x
MSN spider
MSN spider
Navigator
tobli.gif Infos
tobli.gif Quests und Foren
Zelda Suche
Zelda Templates
zurück zum Anfang weiter
zurück
>  Forum
Forum RSS FeedReply
Flying spline enemy killable by hookshot-Fliegender Spline Gegner tötbar mit hookshot
AutorText
aaa2
kriecht schon Link
Avatar

Beiträge: 63
Beitrag: 67

Geschlecht: _NEUTRAL_
Online: Nein
Datum: 18.08.2011 20:42
Flying spline enemy killable by hookshot-Fliegender Spline Gegner tötbar mit hookshot
#post5538
This Script is based on the Catmull Rom Splines by Gleeok(For Movement Behaviour). Thanks also to Isdrakthül for his help on how to check for a weapon on screen.
Dieses Skript basiert auf den Catmull Rom Splines von Gleeok(für die Bewegung). Auch würde ich gerne Isdrakthül danken für seine Hilfe dabei wie man prüft welche Waffen sich auf dem Schirm befinden.
code


const int SFX_HIT=19;
const int CMR_OFFSET      = 32; // 64/2.
const int CMR_NUM_POINTS = 32; // 64/2.

int sp[64];     // - this must be global:
        // x values are 0-31,
        // y values are 32-63.
        // you can set these differently if you like.

float CatMullRom( int current_point, float t )
{
    int p = current_point;
    float ret = 0.5 * ( (2 * sp[p+1]) + (sp[p+2] - sp[p]) * t +
            (2 * sp[p] - 5 * sp[p+1] + 4 * sp[p+2] - sp[p+3]) * t * t +
            (3 * sp[p+1] + sp[p+3] - sp[p] - 3 * sp[p+2]) * t * t * t );
    return ret;
}
float CatMullRom( int current_point, float t, int num_points, bool use_offset )
{
    int p = current_point;
    int n1 = ( p + 1 ) % num_points;
    int n2 = ( p + 2 ) % num_points;
     int n3 = ( p + 3 ) % num_points;
    if( use_offset )
    {
        n1 += CMR_OFFSET;
        n2 += CMR_OFFSET;
        n3 += CMR_OFFSET;
    }

    float ret = 0.5 * ( (2 * sp[n1]) + (sp[n2] - sp[p]) * t +
            (2 * sp[p] - 5 * sp[n1] + 4 * sp[n2] - sp[n3]) * t * t +
            (3 * sp[n1] + sp[n3] - sp[p] - 3 * sp[n2]) * t * t * t );
    return ret;
}


void FFC_CMR( ffc f, int current_point, float t )
{
    f->X = CatMullRom( current_point, t );
    f->Y = CatMullRom( current_point+ CMR_OFFSET, t );
}
void FFC_CMR( ffc f, int current_point, float t, int num_points )
{
    f->X = CatMullRom( current_point, t, num_points, false );
    f->Y = CatMullRom( current_point+ CMR_OFFSET, t, num_points, true );
}
ffc FFC_CMR( int ffc_num, int current_point, float t )
{
    ffc f = Screen->LoadFFC( ffc_num );
    f->X = CatMullRom( current_point, t );
    f->Y = CatMullRom( current_point+ CMR_OFFSET , t );
    return f;
}
ffc FFC_CMR( int ffc_num, int current_point, float t, int num_points )
{
    ffc f = Screen->LoadFFC( ffc_num );
    f->X = CatMullRom( current_point, t, num_points, false );
    f->Y = CatMullRom( current_point+ CMR_OFFSET, t, num_points, true );
    return f;
}








const int SOUNDKILL=10; //SET THE SOUND YOU WANT TO PLAY WHEN THE ENEMY IS KILLED
ffc script splineenemy
{
    void run()
    {
        float t;
        int segment;

        // randomly generate the vectors
        for(int i = 0; i < 32; i++ ) sp[i] = Rand( 16)+Rand( 224 ); // x
        for(int i = 32; i < 64; i++ ) sp[i] = Rand( 16)+Rand( 144 ); // y
//Movement Generation using Catmull
                int conx;
                int cony;
                int hittime=400;
        while(true )
        {
            Waitframe();
            // now compute the location based off current segment
            // ( -a segment is a collection of current tangents- )

            //FFC_CMR( this, segment, t, CMR_NUM_POINTS );
            this->X = CatMullRom( segment, t );
            this->Y = CatMullRom( segment+32, t );

            t += 0.0167;
            if( t >= 1 )
            {
                t -= 1;
                segment++;
                segment %= 32;
            }
                       
                        //Enemy Behaviour
                        int xL=Link->X;
                        int yL=Link->Y;
                        int xT=this->X;
                        int yT=this->Y;
                        if(Distance(xL,yL,xT,yT)<10){
                        Link->HP-=15;
                        Game->PlaySound(SFX_HIT);
                        //MOVE LINK AFTER BEING HIT WHILE MAKING SURE NOT TO END UP IN A SOLID COMBO
                        if((Link->Dir == DIR_UP||Link->Dir == DIR_DOWN) && yL<=yT){
                        for(int i=0;i<30;i++){
                                                if(Screen->isSolid(Link->X,Link->Y)){   
                                                }else{
                                                Link->Y-=1;
                                                }
                                }
                        }
                        if((Link->Dir == DIR_UP||Link->Dir == DIR_DOWN) && yL>=yT){
                        for(int i=0;i<30;i++){
                                                if(Screen->isSolid(Link->X,Link->Y)){   
                                                }else{
                                                Link->Y+=1;
                                                }
                                }
                        }
                        if((Link->Dir == DIR_LEFT||Link->Dir == DIR_RIGHT) && xL<=xT){
                        for(int i=0;i<30;i++){
                                                if(Screen->isSolid(Link->X,Link->Y)){   
                                                }else{
                                                Link->X-=1;
                                                }
                                }
                        }
                        //If Link is left of the enemy 
                        if((Link->Dir == DIR_LEFT||Link->Dir == DIR_RIGHT) && xL>=xT){
                                for(int i=0;i<30;i++){
                                                if(Screen->isSolid(Link->X,Link->Y)){   
                                                }else{
                                                Link->X+=1;
                                                }
                                }
                        }
                        }
for(int i=Screen->NumLWeapons();i>0;i--){
                                        lweapon wpn = Screen->LoadLWeapon(i);
                                        if(Collision(this, wpn)&&wpn->ID==LW_HOOKSHOT) {
                                                                Game->PlaySound(SOUNDKILL);
                                                                Waitframes(20);
                                                                this->Data+=1;
                                                                Quit();

                                                               
                                        }
                       
                       
                       
        }
               
}       
       
}

}

 

Wähle für das Monster(als FFC combo) am Besten einen Totenschädel Combo und der Combo der nach dem Totenschädel Combo kommt sollte ein Combo sein, der ´kleinere Steinchen zeigt.(das ist der Combo mit dem das Monster liegenbleibt)
Best is choose a Skull combo(as the ffc combo) and the combo after the scull should be a combo depicting rubble.(this is the combo that will lie down where the enmy died)
Editiert: 19.08.2011 15:49
Delete Edit Quote
 
aaa2
kriecht schon Link
Avatar

Beiträge: 63
Beitrag: 67

Geschlecht: _NEUTRAL_
Online: Nein
Datum: 19.08.2011 15:50
Re: Flying spline enemy killable by hookshot-Fliegender Spline Gegner tötbar mit hookshot
#post5549
Auf Wunsch von japappi noch einen Testquest zum Gegner
http://www.mediafire.com/?2jxndk4y71f1pps
Delete Edit Quote
 
rising
endlich Link
Avatar

Beiträge: 219
Beitrag: 237

Geschlecht: _MALE_
Online: Nein

Land: Sweden
Datum: 25.08.2011 17:15
Re: Flying spline enemy killable by hookshot-Fliegender Spline Gegner tötbar mit hookshot
#post5564
Smile

Cool script

Maybe i find a way to use this script also.
Delete Edit Quote
 
Muse
kriecht schon Link
Avatar

Beiträge: 75
Beitrag: 77

Geschlecht: _FEMALE_
Online: Nein

Land: Deutschland
Jahrgang: 1990
Idol: Keines
Datum: 25.08.2011 18:05
Re: Flying spline enemy killable by hookshot-Fliegender Spline Gegner tötbar mit hookshot
#post5565
Eine Frage hätte ich mit was für einer Version macht man diese Tests auf. Danke
i Love Zelda
Delete Edit Quote
 
aaa2
kriecht schon Link
Avatar

Beiträge: 63
Beitrag: 67

Geschlecht: _NEUTRAL_
Online: Nein
Datum: 26.08.2011 13:06
Re: Flying spline enemy killable by hookshot-Fliegender Spline Gegner tötbar mit hookshot
#post5566
Delete Edit Quote
 
rising
endlich Link
Avatar

Beiträge: 219
Beitrag: 237

Geschlecht: _MALE_
Online: Nein

Land: Sweden
Datum: 27.08.2011 11:54
Re: Flying spline enemy killable by hookshot-Fliegender Spline Gegner tötbar mit hookshot
#post5567
Smile
Thank you again aaa2.

I did find a way to use this script also haha very cool script.


SmileRising
Delete Edit Quote
 
aaa2
kriecht schon Link
Avatar

Beiträge: 63
Beitrag: 67

Geschlecht: _NEUTRAL_
Online: Nein
Datum: 27.08.2011 15:08
Re: Flying spline enemy killable by hookshot-Fliegender Spline Gegner tötbar mit hookshot
#post5568
Thank you Smile
Delete Edit Quote
 
Reply