Jump to content

Photo

Another request...


  • Please log in to reply
36 replies to this topic

#1 XMSB

XMSB

    Furry Friends Furever

  • Members
  • Real Name:Joseph Watson
  • Location:San Antonio, Texas

Posted 15 August 2010 - 12:09 PM

I was wondering... Would it be possible to make a script for the Keese class that would enable enemies in that class to shoot projectiles as it moves along?
After all, Misc Properties 11 and 12 are for use with scripts. And what kind of script would be required to make use of Misc Attributes 11 and 12?

Edited by XMuppetSB, 15 August 2010 - 12:14 PM.


#2 Joe123

Joe123

    Retired

  • Members

Posted 16 August 2010 - 01:55 PM

Just on a timer like? So 11 would be projectile to shoot and 12 would be frames to wait between shots?
That'd be really easy to do.

EDIT:
CODE
global script Slot2
{
    void run()
    {
        while(true)
        {
            NPCs();
            Waitframe();
        }
    }
    void NPCs()
    {
        npc n;
        for(int i = Screen->NumNPCs(); i > 0; i--)
        {
            n = Screen->LoadNPC(i);
            
            if(n->Type == NPCT_KEESE)
                NPC_Keese(n);
        }
    }
}

//Might need to change this if it's interefering with other scripts
const int NPCM_KEESESHOOTCLK    = 0;

void NPC_Keese(npc Keese)
{
    int ShootDelay = Keese->Attributes[12];
    if(ShootDelay <= 0)
        return;
    
    Keese->Misc[NPCM_KEESESHOOTCLK]++;
    if(Keese->Misc[NPCM_KEESESHOOTCLK] >= ShootDelay)
    {
        CreateEWeaponAt(Keese->Attributes[11], Keese->X, Keese->Y);
    }
}


#3 XMSB

XMSB

    Furry Friends Furever

  • Members
  • Real Name:Joseph Watson
  • Location:San Antonio, Texas

Posted 16 August 2010 - 06:34 PM

EDIT: Never mind... I put spacing between slot and 2 by mistake. But now it works! Thanks a lot! icon_wink.gif
Anyway...
Question 1: Is it the active slot I'm supposed to assign this to?
Question 2: What number do I have assign to Misc 11 for a fireball?
Question 3: Is it possible to make the fireball unblockable like that used by bosses like Gleeok and Manhandla?

Edited by XMuppetSB, 16 August 2010 - 10:22 PM.


#4 Joe123

Joe123

    Retired

  • Members

Posted 17 August 2010 - 01:00 AM

Oh yeah, we have names now! Will need to keep that in mind for future, Active is a much better name than Slot2.
Have a look in std.zh at the EW_ constants.
Possibly.

#5 XMSB

XMSB

    Furry Friends Furever

  • Members
  • Real Name:Joseph Watson
  • Location:San Antonio, Texas

Posted 17 August 2010 - 08:33 AM

I see that EW_FIREBALL is labeled 129 and EW_FIREBALL2 is labeled 145 and Arcing boss fireball. Is Fireball2 supposed to be the rising fireball? And how would I make it to where the fireball has the same properties as that shot by bosses like Gleeok and Manhandla?

#6 Joe123

Joe123

    Retired

  • Members

Posted 17 August 2010 - 11:49 AM

I don't know, have a play around and see what happens. Making it penetrating might not be very easy/possible at all.

I suppose I could make a new eweapon type that was penetrating if I had to, but it'd be a bit of a pain.

#7 Master Maniac

Master Maniac

    Earth, Wind, Fire, and Water.

  • Members
  • Real Name:kris

Posted 17 August 2010 - 12:05 PM

Or you could just make it so that the weapon's deadstate is never triggered...


#8 Joe123

Joe123

    Retired

  • Members

Posted 17 August 2010 - 12:11 PM

DeadState doesn't make things penetrating, it makes them disappear after a certain number of frames.
I never really use it anyway, I've had issues with it in the past.

#9 XMSB

XMSB

    Furry Friends Furever

  • Members
  • Real Name:Joseph Watson
  • Location:San Antonio, Texas

Posted 17 August 2010 - 01:43 PM

It doesn't matter what I set Misc 11 and 12 to. It's just not shooting any fireballs at all. What am I doing wrong? I even tried setting its weapon to fireball. I also have its movement set to Bat. And as for making new enemy weapon types that would be penetrating which would have the same effect as Manhandla/Gleeok/Gohma/Patra/Ganon Fireballs, they would have to be labeled as "Boss Fireball". And all these bosses I mentioned would have to have this weapon set to them by default. The difference is that the regular fireball weapons would be blockable by the magic shield and reflectable by the mirror shield and the boss fireball weapons would not be blockable by either of those two shields.

Edited by XMuppetSB, 17 August 2010 - 08:44 PM.


#10 Master Maniac

Master Maniac

    Earth, Wind, Fire, and Water.

  • Members
  • Real Name:kris

Posted 17 August 2010 - 03:27 PM

QUOTE(Joe123 @ Aug 17 2010, 09:11 AM) View Post

DeadState doesn't make things penetrating, it makes them disappear after a certain number of frames.
I never really use it anyway, I've had issues with it in the past.


But I thought WDS_NONE means that the weapon is still active and can collide with enemies? If so then you can just constantly set the deadstate to WDS_NONE in a while loop.


#11 XMSB

XMSB

    Furry Friends Furever

  • Members
  • Real Name:Joseph Watson
  • Location:San Antonio, Texas

Posted 18 August 2010 - 10:42 AM

All right. Here's the quest file that contains the custom Keese type enemy I'm having trouble with. It's a loose Gleeok head, but it's not shooting any fireballs at all.

Edited by XMuppetSB, 18 August 2010 - 10:42 AM.


#12 Joe123

Joe123

    Retired

  • Members

Posted 18 August 2010 - 02:57 PM

Urm... I think WDS_NONE takes away all collision detection so you can't hit anything with it at all. That'd be what I'd do, but then you also have to loop the enemies each frame on top of the lweapon and stuff.
I have just seen some WDS_ constant which is -1 in std.zh which might do something like what you're saying, but I'm not sure though.

I didn't test it so it's probably just something small, I'll have a look at it.

#13 Master Maniac

Master Maniac

    Earth, Wind, Fire, and Water.

  • Members
  • Real Name:kris

Posted 18 August 2010 - 07:39 PM

Try replacing this:

CODE
    if(Keese->Misc[NPCM_KEESESHOOTCLK] >= ShootDelay)
    {
        CreateEWeaponAt(Keese->Attributes[11], Keese->X, Keese->Y);
    }
}


with this:

CODE
    if(Keese->Misc[NPCM_KEESESHOOTCLK] >= ShootDelay)
    {
        CreateEWeaponAt(EW_FIREBALL2, Keese->X, Keese->Y);
    }
}


See if that helps any. Maybe it's just not reading Keese->Misc[11] properly. Doubt it, but this may help you.


#14 XMSB

XMSB

    Furry Friends Furever

  • Members
  • Real Name:Joseph Watson
  • Location:San Antonio, Texas

Posted 18 August 2010 - 07:46 PM

Nope! That didn't work either! I'm thinking Misc 11 is broken!

Edited by XMuppetSB, 18 August 2010 - 07:49 PM.


#15 Master Maniac

Master Maniac

    Earth, Wind, Fire, and Water.

  • Members
  • Real Name:kris

Posted 18 August 2010 - 07:58 PM

Nope that won't work either...

Let's see...

Oh. Duh. Use an actual Keese enemy instead of the floating Gleeok head. Set your misc's the same way.

Edited by Master Maniac, 18 August 2010 - 08:06 PM.



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users