Jump to content

Photo

Inverted stomp boots

jumping attack item equipment

  • Please log in to reply
25 replies to this topic

#1 Old-Skool

Old-Skool

    Hero of Time

  • Members
  • Location:Missouri

Posted 02 October 2014 - 05:58 PM

I'm looking for a special alteration of the stomp boots that harms enemies when you are travelling upwards instead of down. Seems simple enough, but I can't script to save my life :P

 


Edited by King Aquamentus, 02 October 2014 - 06:59 PM.


#2 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 02 October 2014 - 06:07 PM

I'm assuming this is for use in sideview?



#3 Old-Skool

Old-Skool

    Hero of Time

  • Members
  • Location:Missouri

Posted 02 October 2014 - 06:54 PM

This is, yes. 


  • Astromeow likes this

#4 Magi_Hero

Magi_Hero

    gubgub

  • Members
  • Real Name:Tim
  • Location:NJ

Posted 02 October 2014 - 07:24 PM

So essentially a shoryuken? This sounds neat. Also kinda like a screw attack.


  • Astromeow and HavoX like this

#5 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 02 October 2014 - 10:51 PM

This ought to work. It creates an invisible fire sparkle if a) you have the item, b) you're in sideview, c) your current Y is less than your last Y, and d) you're touching an enemy.

 

import "std.zh"

const int I_SHORYUKEN = 0;
const int SHORYUKEN_DAMAGE = 2;

global script shoryuken
{
    void run()
    {
        int lastY = Link->Y;
        while(true)
        {
            if(Link->Item[I_SHORYUKEN] && IsSideview())
            {
                if(Link->Y < lastY)
                {
                    for(int i = 1; i < Screen->NumNPCs(); i++)
                    {
                        npc enem = Screen->LoadNPC(i);
                        if(LinkCollision(enem))
                        {
                            lweapon weap = CreateLWeaponAt(LW_FIRESPARKLE, enem->X, enem->Y);
                            weap->DrawXOffset = -999;
                            break;
                        }
                    }
                }
                lastY = Link->Y;
            }
            Waitframe();
        }
    }
}


#6 Jamian

Jamian

    ZC enthusiast

  • Members

Posted 03 October 2014 - 04:24 AM

What if you're using a ladder, won't checking for Link->Y make the game think you're jumping even if you aren't? Maybe checking for Link->Jump would be better?



#7 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 03 October 2014 - 08:54 AM

Ladders aren't built-in to ZC, so this script assumes you don't have them.

 

I guess I'm not sure what values Link->Jump has as you jump. I'll have to output it to the screen and see what it does.



#8 Avaro

Avaro

    o_o

  • Members
  • Real Name:Robin
  • Location:Germany

Posted 03 October 2014 - 08:57 AM

Ladders aren't built-in to ZC, so this script assumes you don't have them.

 

I guess I'm not sure what values Link->Jump has as you jump. I'll have to output it to the screen and see what it does.

 

I'm sure that Link->Jump is above 0 when you are jumping. It goes below 0 when you are falling.

I may be wrong. (hopefully not :))



#9 Old-Skool

Old-Skool

    Hero of Time

  • Members
  • Location:Missouri

Posted 04 October 2014 - 11:32 AM

So essentially a shoryuken? This sounds neat. Also kinda like a screw attack.

not *exactly* like a screw attack, but that's the idea. 

I'm not sure about a "fire sparkle", I'm just looking to damage enemies when going up instead of down. 

I do have sideview ladders, but I really don't think this will be a big issue, they're only used for elevators. 

the file won't parse when imported as an item script. Invalid Instruction! the command was "std.zh"

 


Edited by King Aquamentus, 04 October 2014 - 12:01 PM.


#10 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 04 October 2014 - 01:39 PM

Error on import "std.zh"? That's a new one.

 

The fire sparkle is just the easiest self-disposing weapon to use to damage the enemy.

 

Can you make sure you have std.zh in the same folder as ZQ?



#11 Old-Skool

Old-Skool

    Hero of Time

  • Members
  • Location:Missouri

Posted 07 October 2014 - 08:02 PM

I will try. Can't do much right now with zquest at all. 



#12 Mero

Mero

    Touch Fluffy Tail

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

Posted 11 October 2014 - 02:20 PM

I wonder if inverting the ZHitHeight of enemies "setting it to negative" actually works.



#13 Old-Skool

Old-Skool

    Hero of Time

  • Members
  • Location:Missouri

Posted 13 October 2014 - 10:37 AM

std.zh is in place, yes. This is meant to be an item script correct? 
(is back btw)


Edited by King Aquamentus, 13 October 2014 - 10:40 AM.


#14 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 13 October 2014 - 10:48 AM

Nope, it's a global script. You just need to tell it the ID of your special item by setting const int I_SHORYUKEN.



#15 Old-Skool

Old-Skool

    Hero of Time

  • Members
  • Location:Missouri

Posted 13 October 2014 - 01:34 PM

Ah, so that value represents the item ID. very well.

Still receiving the error regarding std.zh though. 

Unable to parse instruction 1 from script screwattack
The error was: invalid instruction!
The command was ("std.zh") (,)


Edited by King Aquamentus, 13 October 2014 - 01:45 PM.




Also tagged with one or more of these keywords: jumping, attack, item, equipment

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users