Jump to content

Photo

HurtEffects.zh - Link Knockback, Sound, etc.


  • Please log in to reply
6 replies to this topic

#1 Cukeman

Cukeman

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

  • Banned
  • Location:Hyrule/USA

Posted 08 August 2016 - 04:49 PM

I'm trying to figure out how to set up this script:

http://www.purezc.ne...=scripts&id=228

 

If an enemy does 0HP damage Link should

- not be knocked back

- not play the hurt SFX

- not flicker

 

First question:

The instructions say "Populate the array HurtSFX[] with sounds that you want to use for land.

float HurtSFX[]={61,62,63,68,70,71,72,73,74,76,75}; //Populate with sounds to play when hurt. 
float HurtSFX_Water[]={62,64,65,78,66,67,69,77}; //Special sounnds to play if Link is hurt while in water. 

// This is a game variables array. the first five values (index 0 to index 4) are used by the functions here.
//    You do not need to modify these first five indices--they should all be '0' when compiling--but you may 
//    expand it as desired, by adding values after the first four elements. 

Well I only want one SFX to be used, but there are 11 numbers in there...??

In my .qst file 19 is my "Link Hurt" SFX, while 18 and 25 are both silent .wav files

 

It says not to modify the first five values, so do I change it to this?

float HurtSFX[]={61,62,63,68,70,19}; //Populate with sounds to play when hurt. 

Edited by Cukeman, 08 August 2016 - 04:49 PM.


#2 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 09 August 2016 - 01:05 AM

 
float HurtSFX[]={19}; //Populate with sounds to play when hurt. 
 
const int WATER_HURT_SOUNDS = 0;

The code comment you're reading, is for LinkStats[100]:

// This is a game variables array. the first five values (index 0 to index 4) are used by the functions here.
// You do not need to modify these first five indices--they should all be '0' when compiling--but you may 
// expand it as desired, by adding values after the first four elements. 
float LinkStats[100]={0,0,0,0,0}; // An arbitrary size, so that we can expand it.
                  // At present, we're using five indices (indices [0]. [1]. and [2], and [3]).

To stop Link flickering, try adding this after Waitdraw()

 

   
Waitdraw();
 
LinkIsDamaged(); //
LinkHurtSound();
 
 
//Add this:
if ( OVERRIDE_LINK_FLASH_FLICKER && Link->HitDir == -1 && !LinkHurt() ) NoLinkFlicker(LINK_FRAMES_FLICKER);
 
///other things
 
Waitframe();

Edited by ZoriaRPG, 09 August 2016 - 01:21 AM.


#3 Shadowblitz16

Shadowblitz16

    Illustrious

  • Members

Posted 20 September 2016 - 11:50 PM

how do I create gameboy style knockback for link with this?



#4 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 22 September 2016 - 07:30 PM

how do I create gameboy style knockback for link with this?


Do you mean angular knockback?

#5 Shadowblitz16

Shadowblitz16

    Illustrious

  • Members

Posted 23 September 2016 - 10:00 PM

ya in the gameboy it depended on what direction the enemy hit you



#6 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 30 September 2016 - 01:00 AM

ya in the gameboy it depended on what direction the enemy hit you


That's something beyond the scope of the header at present. I do have some basic work done on that for the Gameboy header, but it is still far from perfect.

In general, I use some functions to determine the position, and direction of whatever collides with Link, figure out the relative facing directions, and some momentum factors; then I generate a vector of some kind, add variance, and feed all the values into an ffc that runs for a few frames to cause Link to be pushed back.

#7 Shadowblitz16

Shadowblitz16

    Illustrious

  • Members

Posted 17 October 2016 - 08:48 PM

@ZoriaRPG

can you give me a link to the gameboy header? and some kind of description and how to use readme file?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users