Jump to content

Photo

Magic Arrow

Item

  • Please log in to reply
2 replies to this topic

#1 Aefre

Aefre

    artist guy

  • Members
  • Real Name:Jarik
  • Location:Oregon

Posted 07 July 2018 - 04:49 AM

Sorry again for multiple posts! This is (hopefully) the last thing I will need.

 

This arrow, the silver arrow probably, can be controlled by hold down the active button and pressing a direction, 4 ways. (I am using VD so maybe compensate for the L and R buttons...?) I would like for the Silver arrows to only be able to change direction once, and maybe golden infinite? I don't know, whatever is easier for you. 

 

Thank You!



#2 Demonlink

Demonlink

    Lurking in the shadows...

  • Members
  • Real Name:Miguel
  • Location:Wouldn't you like to know?

Posted 08 July 2018 - 05:32 PM

Sorry again for multiple posts! This is (hopefully) the last thing I will need.

 

This arrow, the silver arrow probably, can be controlled by hold down the active button and pressing a direction, 4 ways. (I am using VD so maybe compensate for the L and R buttons...?) I would like for the Silver arrows to only be able to change direction once, and maybe golden infinite? I don't know, whatever is easier for you. 

 

Thank You!

Ask Moosh. He had something similar for his Link's Quest for the Hookshot 2 quest.



#3 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 08 July 2018 - 10:00 PM

This seems siple-enough. resolved by adding one function, and function call to your active script:
 
//Call before Waitdraw() in your global active script.
///Optimised function to allow controlling the direction of silver and gold arrows.
void ArrowDirChange()
{
	int btn;
	if ( Link->InputA )
	{
		if ( GetEquipmentA() == I_ARROW2 ) btn = 2;
		if ( GetEquipmentB() == I_ARROW2 ) btn = 4;
		
	}
	if ( Link->InputB )
	{
		
		if ( GetEquipmentB() == I_ARROW3 ) btn = 3;
		if ( GetEquipmentB() == I_ARROW3 ) btn = 6;
	}
	//silver
	if ( btn ) //n0 mod by zero
	{
		if (!( btn % 2 ))
		{
			if ( Link->PressR )
			{
				lweapon silv;
				for ( int q = Screen->NumLWeapons(); q > 0; --q )
				{
					silv = Screen->LoadWeapon(q);
					if ( silv->Damage >= 4 )
					{
						//only once.
						if ( silv->Misc[LW_MISC_SILARROW] ) break;
						else
						{
							if ( Link->PressLeft ) { ++silv->Misc[LW_MISC_SILARROW]; silv->Dir = DIR_LEFT; break;}
							if ( Link->PressRight ) { ++silv->Misc[LW_MISC_SILARROW]; silv->Dir = DIR_RIGHT;  break;}
							if ( Link->PressUp ) { ++silv->Misc[LW_MISC_SILARROW]; silv->Dir = DIR_UP;  break;}
							if ( Link->PressDown ) { ++silv->Misc[LW_MISC_SILARROW]; silv->Dir = DIR_DOWN;  break;}
							break;
						}
					}
				}
			}
		}
		
		if (!( btn % 3 )) //gold
		{
			if ( Link->PressR )
			{
				lweapon gold;
				for ( int q = Screen->NumLWeapons(); q > 0; --q )
				{
					gold = Screen->LoadWeapon(q);
					if ( gold->Damage >= 8 )
					{
						if ( Link->PressLeft ) gold->Dir = DIR_LEFT;
						if ( Link->PressRight ) gold->Dir = DIR_RIGHT;
						if ( Link->PressUp ) gold->Dir = DIR_UP;
						if ( Link->PressDown ) gold->Dir = DIR_DOWN;
						break;
					}
				}
			}
		}
	}
}

  • ShadowTiger likes this



Also tagged with one or more of these keywords: Item

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users