Jump to content

Photo

Shooting Fireballs


  • Please log in to reply
2 replies to this topic

#1 tox_von

tox_von

    Zelda Addict

  • Members
  • Real Name:Redgor
  • Location:Toxicville , Simcity

Posted 23 February 2012 - 12:11 AM

I found this code in the tutorials what i does is make a ffc orbit link. What i wanted to do with it is make it orbit a ffc or enemy and then after a certain amount of time to shoot towards link and do a few other things like do damage how would i do any of this? How do i identify more than one ffc?



CODE
// This script will make the FFC move in a circle around Link.
const float ORBIT_SPEED = 2.5;
const float ORBIT_RADIUS = 48;

ffc script OrbitLink
{
    void run()
    {
        float angle;
        for(angle = 0; true; angle = (angle + ORBIT_SPEED) % 360)
        {
            this->X = Link->X + ORBIT_RADIUS * Cos(angle);
            this->Y = Link->Y + ORBIT_RADIUS * Sin(angle);
            Waitframe();
        }
    }
}


#2 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 23 February 2012 - 10:17 AM

Shooting fireballs shouldn't be too hard, but first here's the boss orbiting:
WARNING: UNTESTED
CODE
// This script will make the FFC move in a circle around Link.
const float ORBIT_SPEED = 2.5;
const float ORBIT_RADIUS = 48;

ffc script OrbitLink
{
    void run(){
    npc boss = Screen->LoadNPC(0);
        float angle;
        for(angle = 0; boss->isValid(); angle = (angle + ORBIT_SPEED) % 360)
        {
            this->X = boss->X + ORBIT_RADIUS * Cos(angle);
            this->Y = boss->Y + ORBIT_RADIUS * Sin(angle);
            Waitframe();
        }
    }
}


#3 tox_von

tox_von

    Zelda Addict

  • Members
  • Real Name:Redgor
  • Location:Toxicville , Simcity

Posted 23 February 2012 - 04:39 PM

What about one ffc orbiting another i wanted to make custom bosses this was for the gannon one he only does 3 things that i could see and the trident and the spriling out fire also which would be some kind if distance orbit version of this.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users