Jump to content

Photo

Script-counter


  • Please log in to reply
6 replies to this topic

#1 Rastael

Rastael

    Wizard

  • Members
  • Real Name:Raphael
  • Location:Austria

Posted 18 May 2011 - 02:08 PM

Heyho. icon_smile.gif
I want to use one more counter in my quest (for secret seashells).
The secret seashells should be a kind of payment for new ways to go. I think the best way would be an ffc script that is solid before paying and walkable after paying. Or a ffc that will warp Link after paying (but I will need more than one warp per screen).
Can anybody do this for me please, if it is not too complicated? icon_smile.gif
If anybody knows an easier way (maybe without scripting), feel freeto tell me. ^^

(sorry for my bad english)

#2 HylianGlaceon

HylianGlaceon

    Magus

  • Members
  • Location:Whatever dimension is between Sinnoh and Hyrule...

Posted 06 June 2011 - 03:07 PM

Have you tried using a new counter through the Subscreen and using string control codes?

http://shardstorm.co...i/String_Editor

I would assume you could set the first string to change to the next string if the Seashell counter is at a certain number, then use a string to reduce the counter by a certain amount and give Link the item.

#3 Rastael

Rastael

    Wizard

  • Members
  • Real Name:Raphael
  • Location:Austria

Posted 10 June 2011 - 12:05 PM

Hey, thank you, I didn't recognized until yet that such stringcodes exist. ^^

But I'm not sure, if this can help me.
When I reduces a counter by 20, what will happen, when the player only has 15 seashells?
And if he has enough seashells, what will happen then?

(sorry for my bad english)

#4 HylianGlaceon

HylianGlaceon

    Magus

  • Members
  • Location:Whatever dimension is between Sinnoh and Hyrule...

Posted 10 June 2011 - 01:24 PM

Alright, well first you would put this in the beginning first string:

\6\X\X\X - Goto If Counter. If a counter is at or above a certain value, then ZC switches to another string. Argument 1 is the counter, argument 2 is the value, and argument 3 is the string to switch to.

So if you need 20 Seashells, you'd set this one to change to the string where Link gets the item only if the Seashell counter is at 20, otherwise it'll play the next string.

Next is the string where Link gets the item and you take away the amount of Seashells, you'll probably want to use both of these in the same string:

\11\X\X - Counter Down. Reduces a counter by a certain value. Argument 1 is the counter, and argument 2 is the value.
\16\X - Give Item. An item is silently added to Link's inventory. Link does not hold up the item, and the item's Pickup Script does not run - though the item's counter modifications will still take effect. Argument 1 is the item ID.

So you'd set it to reduce the Seashell counter by 20 with the Counter Down, then give Link the proper item.

So basically what happens now is that if Link only has 19 Seashells, it'll play the regular string and do nothing. When he has 20 Seashells, it'll switch to the string where it gives him the item and takes away the seashells.

If you'd like this person or whomever is giving the item to Link to no longer ask for Seashells after Link has gotten the item, you'd want another string put all the way at the beginning and use this code to switch to a different string only if Link has the item for trading in the seashells.

\5\X\X - Goto If Item. If Link has a certain item, then ZC switches to another string. Argument 1 is the item ID (consult the I_* code listing in std.zh), and argument 2 is the string to switch to.

#5 Rastael

Rastael

    Wizard

  • Members
  • Real Name:Raphael
  • Location:Austria

Posted 10 June 2011 - 04:52 PM

Sounds good to me, thank you. icon_smile.gif
And is it possible that the player can reach a new screen after paying, insteed of getting an item?
If yes, does it also work that the player have to pay the seashells every time, he wants to go to the new screen?

#6 HylianGlaceon

HylianGlaceon

    Magus

  • Members
  • Location:Whatever dimension is between Sinnoh and Hyrule...

Posted 11 June 2011 - 11:29 AM

QUOTE(Lord Settra! @ Jun 10 2011, 04:52 PM) View Post

Sounds good to me, thank you. icon_smile.gif
And is it possible that the player can reach a new screen after paying, insteed of getting an item?
If yes, does it also work that the player have to pay the seashells every time, he wants to go to the new screen?


I don't think it's possible directly with this, but you could always give a higher level Sword, Arrow or something else and block off the special area with a trigger that works only with those.

Or you could make the item you receive for trading the seashells a Level Specific Key required to open a door in a special dungeon or something like that. (I think you'd just have to make sure the DMap Level of the Dungeon and where you trade in the Seashells are the same levels)

(Just as a note, if you go with the key and would like the person wanting the seashells to acknowledge that he/she has them already, you can always create a dud Equipment item and give it to Link along with the key in one of the strings and use that ID to change the string at the beginning.)

#7 Rastael

Rastael

    Wizard

  • Members
  • Real Name:Raphael
  • Location:Austria

Posted 12 June 2011 - 05:00 PM

Hey, you're brilliant, thanks a lot. ^^


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users