Jump to content

Photo

2 Script Requests


  • Please log in to reply
17 replies to this topic

#1 Cukeman

Cukeman

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

  • Banned
  • Location:Hyrule/USA

Posted 24 January 2016 - 09:12 PM

Request #1: Could somebody combine these 3 item scripts into a single script?

 

code

 

The first script displays a message when you pick up the item. The second script won't display the message if you currently have the item. The third script chooses between two identical Message Strings based on Link's position so that the message doesn't cover the player (the position of the Message Strings is set up in the String Editor Attributes).

 

D0: Number of Message String to display if Link is near the top of the screen

D1: Number of Message String to display if Link is near the bottom of the screen

D2: Number of Item that prevents Message String from being displayed

 

Requesting this because there is only one item Pickup Script slot.

 

Request #2: Could somebody make a script so that I can create Eyeball Combos larger than 16x16 pixels?

 

Thank you for any help.


Edited by Cukeman, 02 April 2016 - 06:53 AM.


#2 coolgamer012345

coolgamer012345

    🔸

  • Members
  • Location:Indiana, USA

Posted 24 January 2016 - 09:32 PM

First script:

item script AdvancedPickup
{
	void run(int stringA, int stringB, int stringPreventItemID)
	{
		if(!Link->Item[stringPreventItemID])
		{
			if(Link->Y > 96)
			{
				Screen->Message(stringA);
			}
			else
			{
				Screen->Message(stringB);
			}
		}
	}
}

Untested but it should work.

 

For your second script, I'm a bit confused what you mean by "eyeball combos"? Are they triggers? Are they just a purely visual tile that you want to be drawn larger than 16x16? etc


Edited by Coolgamer012345, 24 January 2016 - 11:03 PM.


#3 Cukeman

Cukeman

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

  • Banned
  • Location:Hyrule/USA

Posted 24 January 2016 - 09:40 PM

An Eyeball Combo is not a trigger, it's an existing "animated" combo type; "animated" in the sense that the frame of the animation displayed is the frame which is facing Link (north-facing, south-facing, east-facing, west-facing). There are 4-way and 8-way Eyeball Combos.

 

Thank you for the item script, can't wait to test it!


Edited by Cukeman, 24 January 2016 - 10:25 PM.


#4 justin

justin

    Adept

  • Members

Posted 24 January 2016 - 10:55 PM

Says voidn in cg#s script. Remove the n or it won't compile.

That's not really what I wanted to say, just figured I'd point that typo out first.

What I was gonna say is that the item script arguments are shared between the pick up and action scripts. If any of these pickup items have an action script as well keep that in mind.

Oh, and eyeballs sounds easy enough.

(started scripting it, but tired, will finish tomorrow, if someone beats me to it that's fine too)


Edited by justin, 24 January 2016 - 11:16 PM.


#5 coolgamer012345

coolgamer012345

    🔸

  • Members
  • Location:Indiana, USA

Posted 24 January 2016 - 11:04 PM

Says voidn in cg#s script. Remove the n or it won't compile.

Fixed. Refresh the page for it to take effect.



#6 Cukeman

Cukeman

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

  • Banned
  • Location:Hyrule/USA

Posted 01 March 2016 - 08:18 AM

Fixed. Refresh the page for it to take effect.

 

The script works great, thank you!


Edited by Cukeman, 01 March 2016 - 08:18 AM.

  • coolgamer012345 likes this

#7 Cukeman

Cukeman

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

  • Banned
  • Location:Hyrule/USA

Posted 04 March 2016 - 02:10 AM

First script:

item script AdvancedPickup
{
	void run(int stringA, int stringB, int stringPreventItemID)
	{
		if(!Link->Item[stringPreventItemID])
		{
			if(Link->Y > 96)
			{
				Screen->Message(stringA);
			}
			else
			{
				Screen->Message(stringB);
			}
		}
	}
}

Untested but it should work.

 

For your second script, I'm a bit confused what you mean by "eyeball combos"? Are they triggers? Are they just a purely visual tile that you want to be drawn larger than 16x16? etc

 

Could I request an additional feature? If D2 is not 0, and Link already has the item in D2. I'd like the Item to be briefly drawn over Link's head when he collects it (like in OoT and MC).

 

D3: Whether or not to draw the Item above Link's head

D4: Y Height to draw Item above Link's head (0 matching Link's Y Height, 16 being directly above Link, 32 being another 16 pixels above that, and so on)

D5: Length of time the Item is drawn


Edited by Cukeman, 04 March 2016 - 05:25 AM.


#8 coolgamer012345

coolgamer012345

    🔸

  • Members
  • Location:Indiana, USA

Posted 04 March 2016 - 03:44 AM

After messing around with the script some, I was able to modify it to what you wanted somewhat. However, without the script getting somewhat more complicated there's some limitations:

1. You can't set the height that the item is above link (it is a fixed height of what I think is 16 pixels above link).
2. The holding up the item doesn't happen automatically. However (I'm assuming you wanted the string to still be drawn when Link holds up the item, but I don't actually know. I could make it so it doesn't show the string(s) when Link holds the item) the item and string will go away after the string ends (ie. you press the A or B button after the string is done being "printed" onto the screen).

 

The script could be made to work more like what you described, but it'd require an FFC script along with the item script (mainly if you wanted a specific amount of time Link would hold up the item).

 

Here is the updated script that I made after messing with it for a bit if you want to use it, though:

Spoiler

 

D3 decides if Link holds the item, and also which of his hold sprites he uses. 0 for no holding the item, 1 (or any number larger than 4) to use Links' [1 hand, onland] sprite, 2 for his [2 hand, onland] sprite, 3 for his [1 hand, in water] sprite, and 4 for his [2 hand, in water] sprite. I could also patch in the script automatically to be able to choose to use either an on-land or in-water sprite if link is on land or in water (respectively).


Edited by Coolgamer012345, 04 March 2016 - 03:45 AM.


#9 Cukeman

Cukeman

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

  • Banned
  • Location:Hyrule/USA

Posted 04 March 2016 - 04:13 AM

When I say I want the item to be drawn over Link's head, I mean this:

 

2mheste.jpg

 

Not this:

 

20affpe.jpg

 

The script shouldn't need to address anything about Link holding the item with one hand or two.



#10 coolgamer012345

coolgamer012345

    🔸

  • Members
  • Location:Indiana, USA

Posted 04 March 2016 - 04:20 AM

Do you want Link to be immobile while the Item is above link, and do you want the item to be "locked" in place or do you want it to move if Link moves?



#11 Cukeman

Cukeman

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

  • Banned
  • Location:Hyrule/USA

Posted 04 March 2016 - 04:28 AM

Do you want Link to be immobile while the Item is above link, and do you want the item to be "locked" in place or do you want it to move if Link moves?

 

I assume you mean "not animated" when you say "immobile". Not animated is fine.

EDIT: I misread "Do you want Link to be immobile" as "Do you want the Item to be immobile".

I do not want Link to be immobile, it's fine if the Item is a still image (not animated).

 

I would like it if the item moves if Link moves- if it's not overly complicated- the item won't be displayed for very long.

 

Now that I think about it, I would like D6 to be the tile drawn above Link's head (in case I need to show a somewhat different image from the item itself).


Edited by Cukeman, 04 March 2016 - 05:10 AM.


#12 coolgamer012345

coolgamer012345

    🔸

  • Members
  • Location:Indiana, USA

Posted 04 March 2016 - 04:50 AM

Do you want an item AND Tile able to be drawn above Link at the same time or not to draw the item if the Tile arg is set?

 

Edit: Also, do you want D7 to be the CSet to draw the tile or do you want the CSet of the tile to be drawn to be hardcoded (or maybe even the CSet of the items tile)?


Edited by Coolgamer012345, 04 March 2016 - 04:52 AM.


#13 Cukeman

Cukeman

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

  • Banned
  • Location:Hyrule/USA

Posted 04 March 2016 - 05:07 AM

1) I misread your previous question.
 
You asked "Do you want Link to be immobile while the Item is above link?"
I read that as "Do you want the Item to be immobile while it is above Link?"
 
I do not want Link to be immobile, it's fine if the Item is a still image (not animated).
 
2) I'm using 8-Bit Color, so I won't need to select a CSet
 
EDIT:

 

Do you want an item AND Tile able to be drawn above Link at the same time or not to draw the item if the Tile arg is set?

 

I only want to be able to draw the Tile.


Edited by Cukeman, 04 March 2016 - 05:23 AM.


#14 coolgamer012345

coolgamer012345

    🔸

  • Members
  • Location:Indiana, USA

Posted 04 March 2016 - 05:37 AM

This is slightly more complicated, as you need to put "DrawItemsAboveLink();" somewhere in your while loop in your global script (assuming you have one), before "Waitframe();", and include the functions somewhere in your script or equivalent,  but should work how you want it to.

 

Spoiler

 

Edit: If there's any more issues I'll have to work on them in a few hours* as I gotta get some sleep now.

 

*(anywhere from 6 to 12 hours)


Edited by Coolgamer012345, 04 March 2016 - 05:44 AM.


#15 Cukeman

Cukeman

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

  • Banned
  • Location:Hyrule/USA

Posted 04 March 2016 - 06:08 AM

I have a couple of questions:

 

1) Which part of the script is it that requires global scripting? I don't mean to sound ungrateful, but I try *really* hard to avoid global scripting as much as I can, and there might be a way to simplify something.

 

2) Is drawing the item above Link any easier than drawing the tile above Link? (I do prefer to draw the tile rather than the item, I'm just thinking about options)


Edited by Cukeman, 04 March 2016 - 06:29 AM.



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users