Jump to content

Photo

Slash Scroll


  • Please log in to reply
4 replies to this topic

#1 Aefre

Aefre

    artist guy

  • Members
  • Real Name:Jarik
  • Location:Oregon

Posted 01 July 2017 - 12:28 AM

So you know how the only way to give the player the "Slash" ability is through a guy? Well, is it possible to put it as a scroll, or item? So when you obtain it, you learn slash without the need of a guy.



#2 Tabletpillow

Tabletpillow

    Hi

  • Members
  • Real Name:Xavier
  • Location:Oregon

Posted 01 July 2017 - 12:36 AM

Make it another sword, in the item editor. There's an option to make so that you can make it slash or only stab.



#3 Saffith

Saffith

    IPv7 user

  • ZC Developers

Posted 01 July 2017 - 12:50 AM

A script might be easier in this case. It's trivial.
 
item script SlashScroll
{
    void run()
    {
        Game->Generic[GEN_CANSLASH]=1;
    }
}


#4 Aefre

Aefre

    artist guy

  • Members
  • Real Name:Jarik
  • Location:Oregon

Posted 01 July 2017 - 10:39 AM

Yah, I fidured it wouldn't be that hard

 

Make it another sword, in the item editor. There's an option to make so that you can make it slash or only stab.

I knew I could do that, but what if they miss the slash scroll and then got the second sword, then the slash scroll would be useless.

 

A script might be easier in this case. It's trivial.
 

item script SlashScroll
{
    void run()
    {
        Game->Generic[GEN_CANSLASH]=1;
    }
}

Thanks Saffith!



#5 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 01 July 2017 - 04:57 PM

Yah, I fidured it wouldn't be that hard

 

I knew I could do that, but what if they miss the slash scroll and then got the second sword, then the slash scroll would be useless.

 

Thanks Saffith!

 

a30502355 meant that you could make sword levels that can only stab, and enable slash in init data, so that swords that can slash would do it, and lower level swords without slash, would not. 

 

A script truly is the best option here, so use that. :D

 

Saffith's script should be assigned as the pick-up script for the item, not the active script.

 

If you want to be clever, you could give the user the ability to turn slash on and off.

 

item script SlashScroll
{
    void run()
    {
        if ( !(Game->Generic[GEN_CANSLASH]) ) Game->Generic[GEN_CANSLASH] = 1;
    else Game->Generic[GEN_CANSLASH] = 0;
    }
}

 

That would make an item that when used, toggles slash as the active script on an item. It is also possible to do strange things, such as give slash on a timer. I should do that as a spell item, that gives Link slash for a duration, and requires reactivating it for an MP cost after it expires. It could be an interesting gimmick to change the difficulty curve of a quest.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users