Jump to content

Photo

SFX Script Request


  • Please log in to reply
29 replies to this topic

#16 Cukeman

Cukeman

    "Tra la la, look for Sahasrahla. ... ... ..."

  • Banned
  • Location:Hyrule/USA

Posted 05 August 2016 - 02:45 PM

Cool- the sound is no longer repeating, still doesn't play at 1MP though...


Edited by Cukeman, 05 August 2016 - 06:02 PM.


#17 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 06 August 2016 - 02:20 AM

Cool- the sound is no longer repeating, still doesn't play at 1MP though...

Does Link have half magic? Does the lens work when he has 1MP?

If the lens costs 2 to use, and Link has half magic, then it would cost 1, IIRC. I may need to check how I did this in my UseMagic(int val) function.

Edit: I checked, and that's how I've done it (twice) before, but perhaps none of them are correct.

Try placing it before Waitdraw(), instead of after it, and tell me what happens.

Edited by ZoriaRPG, 06 August 2016 - 02:32 AM.


#18 Cukeman

Cukeman

    "Tra la la, look for Sahasrahla. ... ... ..."

  • Banned
  • Location:Hyrule/USA

Posted 06 August 2016 - 02:53 PM

Does Link have half magic? Does the lens work when he has 1MP?

If the lens costs 2 to use, and Link has half magic, then it would cost 1, IIRC. I may need to check how I did this in my UseMagic(int val) function.

Edit: I checked, and that's how I've done it (twice) before, but perhaps none of them are correct.

Try placing it before Waitdraw(), instead of after it, and tell me what happens.

 

Link does not have 1/2 magic,  and the Lens does not work when he has 1MP.

 

The Lens does cost 2 to use.

 

I placed it before Waitdraw(), and there's no change.



#19 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 06 August 2016 - 10:55 PM

Found a typo that is probably at fault. Try it this way:

const int SFX_ERROR_ITEM = 80;//Used for NotEnoughError script


//globalsection
            Waitdraw();
            NotEnoughError(I_LENS, 2, CR_MAGIC, SFX_ERROR_ITEM);
//endglobal



void NotEnoughError(int item_ID, int cost, int counter,  int sound){
    bool used; 
    if ( counter == CR_MAGIC ) cost = cost * Game->Generic[GEN_MAGICDRAINRATE];
    if  ( GetEquipmentA() == item_ID && Link->PressA ) used = true;
    if ( !used ) { if ( GetEquipmentB() == item_ID && Link->PressB ) used = true; }
    if ( used && Game->Counter[counter] < cost ) Game->PlaySound(sound);
}

  • Cukeman likes this

#20 Cukeman

Cukeman

    "Tra la la, look for Sahasrahla. ... ... ..."

  • Banned
  • Location:Hyrule/USA

Posted 06 August 2016 - 11:15 PM

It's working :D



#21 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 07 August 2016 - 10:03 AM

It's working :D

I must have hit / instead of * on my numpad. Didn't notice, at first. If you note, the other functions have a *.

Check it with some varied amounts from 2MP to 64MP and verify that it doesn't cause you any grief; and check that it properly respects 'half magic', as it should. Other than this, you should be set up now for these effects. :)

Edited by ZoriaRPG, 07 August 2016 - 10:05 AM.


#22 Cukeman

Cukeman

    "Tra la la, look for Sahasrahla. ... ... ..."

  • Banned
  • Location:Hyrule/USA

Posted 07 August 2016 - 04:32 PM

Yup, it's working with 1/2 Magic.

 

Interestingly (at least with the Lens) it still costs 2MP with 1/2 Magic, but the time between drains is twice as long.

 

EDIT: It does play the error sound on the last successful use, but that's also the moment when the MP drops below the minimum, so that's understandable, if a bit odd (moreso with things like Din's Fire and Nayru's Love).


Edited by Cukeman, 07 August 2016 - 04:54 PM.


#23 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 07 August 2016 - 04:54 PM

Yup, it's working with 1/2 Magic.
 
Interestingly (at least with the Lens) it still costs 2MP with 1/2 Magic, but the time between drains is twice as long.
 
EDIT: It does play the error sound on the last successful use, but that's also the moment when the MP drops below the minimum, so that's understandable, if a bit odd (moreso with things like Din's Fire and Nayru's Love).


Do you have it before, or after Waitdraw?

#24 Cukeman

Cukeman

    "Tra la la, look for Sahasrahla. ... ... ..."

  • Banned
  • Location:Hyrule/USA

Posted 07 August 2016 - 05:12 PM

Do you have it before, or after Waitdraw?

 

It was after, I moved it to before, and it didn't play the SFX on the last successful use, on the first test, but on subsequent tests it did play the SFX on the last successful use.

 

Also, it seems like the way the magic cost actually works is that it doubles the cost in the Item Editor UNLESS you have 1/2 Magic.

 

EDIT: So, I've had to put 63 instead of 31, when the cost of Din's Fire is listed at 32 in the Item Editor


Edited by Cukeman, 07 August 2016 - 06:21 PM.


#25 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 07 August 2016 - 06:16 PM

It was after, I moved it to before, and it didn't play the SFX on the last successful use, on the first test, but on subsequent tests it did play the SFX on the last successful use.

 

Also, it seems like the way the magic cost actually works is that it doubles the cost in the Item Editor UNLESS you have 1/2 Magic.

 

EDIT: So, I've have to put 63 instead of 31, when the cost of Din's Fire is listed at 32 in the Item Editor

 

First, place it after Waitdraw(). Tell me if that fixes the issue with it playing the sound on the last use.



#26 Cukeman

Cukeman

    "Tra la la, look for Sahasrahla. ... ... ..."

  • Banned
  • Location:Hyrule/USA

Posted 07 August 2016 - 06:36 PM

First I tested it after Waitdraw, and the Error SFX played on the last successful use. Then you posted this:

 

Do you have it before, or after Waitdraw?

 

 

So I moved it to before and tested it. At first it seemed to fix the issue, but only once, then the Error SFX played on last successful use just like it did when it was after Waitdraw. So, I've tested both.

 

EDIT: And, to be triple sure, I just now put it after Waitdraw and tested it again.

 

EDIT2: I think I've discovered a bug of some sort.

 

It costs 64MP to use Din's Fire, and I have the script set up like so:

            NotEnoughError(I_DINSFIRE, 63, CR_MAGIC, SFX_ERROR_ITEM);

 

But now the SFX plays not only at 63MP and 64MP, but also at 128MP...???

 

Tempted to just forget about this entirely.


Edited by Cukeman, 07 August 2016 - 06:36 PM.


#27 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 07 August 2016 - 06:43 PM

First I tested it after Waitdraw, and the Error SFX played on the last successful use. Then you posted this:

 

 

 

So I moved it to before and tested it. At first it seemed to fix the issue, but only once, then the Error SFX played on last successful use just like it did when it was after Waitdraw. So, I've tested both.

 

EDIT: And, to be triple sure, I just now put it after Waitdraw and tested it again.

 

EDIT2: I think I've discovered a bug of some sort.

 

It costs 64MP to use Din's Fire, and I have the script set up like so:

            NotEnoughError(I_DINSFIRE, 63, CR_MAGIC, SFX_ERROR_ITEM);

 

But now the SFX plays not only at 63MP and 64MP, but also at 128MP...???

 

Tempted to just forget about this entirely.

 

The magic usage issue is fixable. The error sound...I may be able to make a workaround, but it'd require item use scripts.



#28 Cukeman

Cukeman

    "Tra la la, look for Sahasrahla. ... ... ..."

  • Banned
  • Location:Hyrule/USA

Posted 07 August 2016 - 07:40 PM

I don't think it's worth going to all the trouble.

 

I know it's ridiculous for me to be frustrated, when you're doing all the work, but I don't want you to do so much work on something that's not very important.

 

I wouldn't ask for scripts like this if I realized they weren't simple.



#29 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 08 August 2016 - 02:30 AM

I don't think it's worth going to all the trouble.

 

I know it's ridiculous for me to be frustrated, when you're doing all the work, but I don't want you to do so much work on something that's not very important.

 

I wouldn't ask for scripts like this if I realized they weren't simple.

 

If you are certain that you won't use a fixed version, then I won't bother. It's really up to you: I don't have time to make things that won't be used, but I'll spend the time to debug something that will be used.



#30 Cukeman

Cukeman

    "Tra la la, look for Sahasrahla. ... ... ..."

  • Banned
  • Location:Hyrule/USA

Posted 08 August 2016 - 05:38 AM

I'd definitely use it. I just worry about the amount of work versus the benefits of the outcome.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users