Jump to content

Photo

stdWeapons.zh

library beta

  • Please log in to reply
96 replies to this topic

#61 Alucard648

Alucard648

    Wizard

  • Members
  • Location:castle Dracula

Posted 03 November 2016 - 05:44 AM

@Alucard648

Can you explain the sound argument in the LweaponInit() function?

Is it the sound that plays when the item is picked up or the sound it plays when being used?

I was wondering this because because I am trying to make a Gameboy style sword and it used multiple random sounds when the sword was swung.

 

Edit: also what do I put for the sprite argument in LweaponInit() if I have multiple sprites?

 

I'm trying to make a gameboy sword

 

here is my script even though it is unfinished and I was in the process of renaming stuff

Spoiler

LweaponInit last argument plays sound on creation of ghosted lweapon (i.e. when using item). You could, for instance, create array of sound ID`s, choose one at random and pass in chosen sound ID into LweaponInit to play random sound on each sword swing.



#62 Shadowblitz16

Shadowblitz16

    Illustrious

  • Members

Posted 03 November 2016 - 08:35 AM

@Alucard648 

well I want to play diffrent sounds depending on if link is slashing, stabbing, charging, or spinning

 

also about sprites?

is there a way to display different sprites for different sword states?  for example slashing, stabbing, charging, or spinning?


Edited by Shadowblitz16, 03 November 2016 - 09:00 AM.


#63 Shadowblitz16

Shadowblitz16

    Illustrious

  • Members

Posted 04 November 2016 - 03:40 PM

@Alucard648 you there?


Edited by Shadowblitz16, 04 November 2016 - 03:51 PM.


#64 Alucard648

Alucard648

    Wizard

  • Members
  • Location:castle Dracula

Posted 08 December 2016 - 01:22 AM

@Alucard648 

well I want to play diffrent sounds depending on if link is slashing, stabbing, charging, or spinning

 

also about sprites?

is there a way to display different sprites for different sword states?  for example slashing, stabbing, charging, or spinning?

You could call Game->PlaySound for different sounds and lweapon->UseSprite for different sprites before calling slash/stab function.



#65 judasrising

judasrising

    I play guitar

  • Members
  • Location:Sweden but born in Finland

Posted 10 December 2016 - 03:23 PM

Hi

 

I get compile errors when i try to setup the ether medallion and quake medallion,bombos medallion,

the errors are:

FUNCTION FULLSCREENATTACK IS UNDECLARED

VARIABLE LWF_INVISIBLE IS UNDECLARED

 

Issue solved i had somehow older version of stdWeapons.zh


Edited by judasrising, 11 December 2016 - 12:10 PM.


#66 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 11 December 2016 - 05:16 PM

@Alucard: Are you interested in working with me on a version of this for 2.54, or should I just go ahead and finish Phantom.zh?

I think that you are going to enjoy the sprite selector for scripted weapons, and the new input values in the editor that you can now read by script.

I should be making some demo scripts for that, later this week. :)

#67 judasrising

judasrising

    I play guitar

  • Members
  • Location:Sweden but born in Finland

Posted 14 December 2016 - 04:13 PM

Hi

 

This happens when i use the Ether medallion item

ether.png

 

it allmost freezes Link and cant move ,it draws the lighting and it seems to freeze, i dont know what causes that.

Any ideas?



#68 Alucard648

Alucard648

    Wizard

  • Members
  • Location:castle Dracula

Posted 15 December 2016 - 10:44 AM

Hi

 

This happens when i use the Ether medallion item

ether.png

 

it allmost freezes Link and cant move ,it draws the lighting and it seems to freeze, i dont know what causes that.

Any ideas?

Check D2 and D5. They should not be 0.



#69 judasrising

judasrising

    I play guitar

  • Members
  • Location:Sweden but born in Finland

Posted 15 December 2016 - 01:00 PM

Check D2 and D5. They should not be 0.

Here is my values:

ether%20item.png

 

and in that testscreen it does not even do the Link->Action=LA_CASTING;



#70 Alucard648

Alucard648

    Wizard

  • Members
  • Location:castle Dracula

Posted 15 December 2016 - 01:49 PM

Ran test on my stdWeaponsDemo. Weapon works fine in ZC 2.5.2. Apparently a conflict with other scripts can occur.

As for LA_CASTING: This does not work for some reason in the current ZC version.


Edited by Alucard648, 15 December 2016 - 01:55 PM.


#71 judasrising

judasrising

    I play guitar

  • Members
  • Location:Sweden but born in Finland

Posted 15 December 2016 - 02:01 PM

Ran test on my stdWeaponsDemo. Weapon works fine in ZC 2.5.2. Apparently a conflict with other scripts can occur.

As for LA_CASTING: This does not work for some reason in the current ZC version.

Then i dont know what i can do? i also play your stdWeaponsDemo and it works fine and i tryed to setup as it is in that file.

it is so close for me to actual have those 3 medallions from Lttp but still far away since it does not work for me and i have no clue.



#72 Alucard648

Alucard648

    Wizard

  • Members
  • Location:castle Dracula

Posted 15 December 2016 - 02:10 PM

Then i dont know what i can do? i also play your stdWeaponsDemo and it works fine and i tryed to setup as it is in that file.

it is so close for me to actual have those 3 medallions from Lttp but still far away since it does not work for me and i have no clue.

Check your global script: it should have UpdateLweaponZH function call.



#73 judasrising

judasrising

    I play guitar

  • Members
  • Location:Sweden but born in Finland

Posted 15 December 2016 - 02:15 PM

Check your global script: it should have UpdateLweaponZH function call.

yes i have that one. 

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------

///Common Constant, only need to define once per script file.
const int BIG_LINK = 0; //Set this to 1 if using the Large Link Hit Box feature.
 
global script Slot_2{
void run(){
int oldscreen = Game->GetCurDMapScreen();
Game->MCounter[CR_SCRIPT1] = 50;
holding_block = 0;
StartGhostZH();
Tango_Start();
//Setup_IceCombos(); //Setup variables for ice combos.
//int oldscreen = Game->GetCurScreen(); //Variable that stores Game->GetCurScreen() the previous frame.
while(true){
if ( REQUIRE_MOON_PEARL ) MoonPearl();
   ReducePostWarpTimer();
            MirrorWarpLink();
            //if ( TEST_MIRROR_SPARKLE ) TestSparkle();
            //if ( MIRROR_SPARKLE_BEFORE_WAITDRAW ) MirrorSparkle();
SpidersMark(oldscreen,Game->GetCurDMapScreen());
            StepSound();
   deathAnimations();
Shovel();
PowerBracelet();
Tango_Update1();
if ( SHOP_DARK_WHEN_CLOSED ) FFC_ShopDarkness(); //Manages shop darkness.
UpdateGhostZH1();
ItemSpawnsEnemyOrLandmine();
 
//int cmb;
//lweapon lw;
//if(Screen->NumLWeapons() > 0){
//for(int i=1; i<=Screen->NumLWeapons(); i++){
//lw = Screen->LoadLWeapon(i);
//if (lw->ID == 20){
//cmb = ComboAt(lw->X, lw->Y);
//if (Screen->ComboT[cmb] == 42 && (Screen->ComboF[cmb] == 100 || Screen->ComboI[cmb] == 100)){
//Screen->ComboD[cmb] += 1;
//}
//break;
//}
//}
//}
UpdateLweaponZH();
Waitdraw();
WarpFinish();
            //if ( !MIRROR_SPARKLE_BEFORE_WAITDRAW ) MirrorSparkle();
            if ( WarpSparkle() ) MirrorSparkle(); //Call only if it exists.
//Update_IceCombos(oldscreen);
//oldscreen = Game->GetCurScreen();
if(oldscreen!=Game->GetCurDMapScreen())oldscreen = Game->GetCurDMapScreen();
Tango_Update2();
UpdateGhostZH2();
Waitframe();
ScreenChange_Update();
      Pot_Script();
}
}
}

Edited by judasrising, 15 December 2016 - 02:15 PM.


#74 Alucard648

Alucard648

    Wizard

  • Members
  • Location:castle Dracula

Posted 15 December 2016 - 02:44 PM

 

yes i have that one. 

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------

///Common Constant, only need to define once per script file.
const int BIG_LINK = 0; //Set this to 1 if using the Large Link Hit Box feature.
 
global script Slot_2{
void run(){
int oldscreen = Game->GetCurDMapScreen();
Game->MCounter[CR_SCRIPT1] = 50;
holding_block = 0;
StartGhostZH();
Tango_Start();
//Setup_IceCombos(); //Setup variables for ice combos.
//int oldscreen = Game->GetCurScreen(); //Variable that stores Game->GetCurScreen() the previous frame.
while(true){
if ( REQUIRE_MOON_PEARL ) MoonPearl();
   ReducePostWarpTimer();
            MirrorWarpLink();
            //if ( TEST_MIRROR_SPARKLE ) TestSparkle();
            //if ( MIRROR_SPARKLE_BEFORE_WAITDRAW ) MirrorSparkle();
SpidersMark(oldscreen,Game->GetCurDMapScreen());
            StepSound();
   deathAnimations();
Shovel();
PowerBracelet();
Tango_Update1();
if ( SHOP_DARK_WHEN_CLOSED ) FFC_ShopDarkness(); //Manages shop darkness.
UpdateGhostZH1();
ItemSpawnsEnemyOrLandmine();
 
//int cmb;
//lweapon lw;
//if(Screen->NumLWeapons() > 0){
//for(int i=1; i<=Screen->NumLWeapons(); i++){
//lw = Screen->LoadLWeapon(i);
//if (lw->ID == 20){
//cmb = ComboAt(lw->X, lw->Y);
//if (Screen->ComboT[cmb] == 42 && (Screen->ComboF[cmb] == 100 || Screen->ComboI[cmb] == 100)){
//Screen->ComboD[cmb] += 1;
//}
//break;
//}
//}
//}
UpdateLweaponZH();
Waitdraw();
WarpFinish();
            //if ( !MIRROR_SPARKLE_BEFORE_WAITDRAW ) MirrorSparkle();
            if ( WarpSparkle() ) MirrorSparkle(); //Call only if it exists.
//Update_IceCombos(oldscreen);
//oldscreen = Game->GetCurScreen();
if(oldscreen!=Game->GetCurDMapScreen())oldscreen = Game->GetCurDMapScreen();
Tango_Update2();
UpdateGhostZH2();
Waitframe();
ScreenChange_Update();
      Pot_Script();
}
}
}

 

Does the other full-screen spells work (Quake and Bombos)?



#75 judasrising

judasrising

    I play guitar

  • Members
  • Location:Sweden but born in Finland

Posted 15 December 2016 - 02:46 PM

Does the other full-screen spells work (Quake and Bombos)?

No it is the same result

Edit: correct answer is that Quake and Bombos works all i did was try with a new save file again then those 2 works but not Ether medallion.


Edited by judasrising, 15 December 2016 - 03:21 PM.




Also tagged with one or more of these keywords: library, beta

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users