Jump to content

Photo

Wind-blower

Enemy Wind Trap Autoghost

  • Please log in to reply
9 replies to this topic

#1 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 07 April 2014 - 06:29 PM

Love the concept of Windrobes? Wish they were just slightly less annoying? Wish you could rationalize filling a dungeon with 'em? Then have I got the enemy for you!

 

Behold, the windBlower! This nastiful enemy shoots whirlwinds that carry you away like those of the Windrobes, only they don't return you to the start of the dungeon. This little guy goes great with floor spikes and even better with bottomless pits. Whirlwinds will carry Link with them until they hit the edge of a screen or a wall. Then they just drop him.

 

Type: Other

Attribute 1: Max attack rate in frames (default 80)

Attribute 2: Gust step speed (default 350)

All typical enemy attributes are used.

const int WPS_WIND = 13; //Wind sprite

ffc script windBlower{
    void run(int enemyID){
        npc ghost = Ghost_InitAutoGhost(this, enemyID);
        Ghost_SetFlag(GHF_FLYING_ENEMY);
        
        int attRate = Ghost_GetAttribute(ghost, 0, 80);
        int gustStep = Ghost_GetAttribute(ghost, 1, 350);
        
        int turnTimer = ghost->Rate*10;
        int attTimer = Rand(attRate/2, attRate);
        eweapon gust;
        
        do{
            //Handle active gust
            if(gust->isValid())
                doGust(gust);
            
            //Shoot
            else{
                attTimer--;
                if(attTimer <= 0){
                    attTimer = Rand(attRate/2, attRate);
                    gust = FireNonAngularEWeapon(EW_SCRIPT1, Ghost_X, Ghost_Y, Ghost_Dir, gustStep, 0, WPS_WIND, SFX_WHIRLWIND, EWF_NO_COLLISION);
                }
            }
            
            //Walk and turn
            turnTimer = Ghost_ConstantWalk4(turnTimer, ghost->Step, ghost->Rate*10, ghost->Homing, ghost->Hunger);
        }while(Ghost_Waitframe(this, ghost, true, true));
    }
    
    //Blow Link away if touching gust
    void doGust(eweapon gust){
        //If can't move there, kill gust
        if(!CanWalk(gust->X, gust->Y, gust->Dir, gust->Step/100, false)){
            Remove(gust);
            return;
        }
        
        //If not touching, quit
        if(DistanceLink(gust) > 10)
            return;
        
        //Place Link on gust
        Link->X = gust->X;
        Link->Y = gust->Y;
        
        //Make Link float (over pits)
        Link->Z = 4;
    }
}


Edited by MoscowModder, 11 April 2014 - 05:17 PM.

  • Mero, Aevin and Astromeow like this

#2 David

David

    Fallen leaves... adorn my night.

  • Administrators
  • Real Name:David
  • Pronouns:He / Him

Posted 07 April 2014 - 06:33 PM

Wow, this is a really nice enemy! I think it is much nicer than the normal Windrobes. :D



#3 Aevin

Aevin

  • Members
  • Pronouns:He / Him
  • Location:Oregon

Posted 07 April 2014 - 09:19 PM

Your pitch in the first paragraph describes me exactly. I love wind enemies, but windrobes are just too annoying. This sounds awesome.



#4 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 07 April 2014 - 09:47 PM

This thread serves to remind me that I need to release more of the scripts I make for myself.

 

Glad you guys like it!



#5 Mero

Mero

    Touch Fluffy Tail

  • Banned
  • Real Name:Tamamo No Mae
  • Location:Rainbow Factory

Posted 07 April 2014 - 09:52 PM

I love you MoscowModder. Great work. :D


Edited by Zecora, 07 April 2014 - 10:05 PM.


#6 Alucard648

Alucard648

    Wizard

  • Members
  • Location:castle Dracula

Posted 07 April 2014 - 11:51 PM

This little guy goes great with floor spikes and even better with bottomless pits.

Damage32 combos work best with them.  :twisted:



#7 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 08 April 2014 - 12:06 AM

Legal notice: The script author is not responsible for any heartache, frustration, or suicidal thoughts incurred as a result of playing any quest that uses this script. The implementation of this script is the sole responsibility of the quest author.


  • Mero likes this

#8 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 11 April 2014 - 05:19 PM

Update!

 

  • The "reach" of the winds is smaller - they will only pick Link up if he is within 10 pixels of their center.
  • Link will be in the air while caught in the wind - this means he will be carried above pits and lava and the like, allowing for clever puzzle opportunities. Of course, he will be dropped whenever he hits a wall.


#9 Mero

Mero

    Touch Fluffy Tail

  • Banned
  • Real Name:Tamamo No Mae
  • Location:Rainbow Factory

Posted 11 April 2014 - 08:01 PM

You know you could make this into a function that replaces whirlwinds with this behavior. That would be really cool MM. :D

 

edit: Also the air thing won't work in sideview gravity screens; Never the less, I think It would be cool if that was optional.


Edited by Zecora, 11 April 2014 - 08:03 PM.

  • Binx likes this

#10 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 11 April 2014 - 09:45 PM

Odd, I would have thought setting Link->Y every frame would do it.





Also tagged with one or more of these keywords: Enemy, Wind, Trap, Autoghost

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users