Jump to content

Photo

Item Strings?


  • Please log in to reply
14 replies to this topic

#1 Zenith

Zenith

    Old Guard

  • Members

Posted 11 January 2008 - 12:11 AM

Don't know if this involves a script or not, so I hope this is in the right forum. icon_rolleyes.gif

I was playing Joe123's 2 Week Quest Contest entry (you know the one). I noticed how he made message strings show up whenever Link picked up an important item. It didn't look like event flags, because of how seamless it was. The string appeared not when Link stepped on the tile the item was on, but when he picked up the item itself. I wanna know how he did that.

And I'm using 2.5 b679, if that matters.

Edited by zmaster, 11 January 2008 - 12:12 AM.


#2 Joe123

Joe123

    Retired

  • Members

Posted 11 January 2008 - 06:15 AM

CODE
item script message{
    void run(int m){
        Screen->Message(m);
    }
}


Where D0 on the item is what message you want to play.

Also note that Quest Rules:
Messages Freeze All Action
Messages Dissapear

Should be checked.

#3 LostInHyru1e

LostInHyru1e

    Can you take me as far as PureZC?

  • Members
  • Real Name:Lost
  • Location:Refer to Screename

Posted 11 January 2008 - 01:29 PM

Wow, cool! What a simple yet awesome script. icon_smile.gif Joe, you've been cranking out the most useful scripts lately...

#4 Joe123

Joe123

    Retired

  • Members

Posted 11 January 2008 - 01:32 PM

Heh, pretty much everyone who has even the simplest grasp of ZScript has written that script, no need to credit me for it.

#5 LostInHyru1e

LostInHyru1e

    Can you take me as far as PureZC?

  • Members
  • Real Name:Lost
  • Location:Refer to Screename

Posted 11 January 2008 - 01:54 PM

Not just that one... I mean, you've been cranking out some wonder-scripts in general. Ones that could possibly be hard-coded into future ZQuest installments... maybe. :Shrugs: I don't know much about Hard-Coding as opposed to scripting.

#6 Rocksfan13

Rocksfan13

    Looks best in Blue

  • Members
  • Real Name:Doug
  • Location:Earth

Posted 11 January 2008 - 02:04 PM

Woops, wrong forum. I'll move it.


*Topic moved from Zquest Editor Help*


#7 Joe123

Joe123

    Retired

  • Members

Posted 11 January 2008 - 02:10 PM

QUOTE(LostInHyru1e @ Jan 11 2008, 06:54 PM) View Post

Not just that one... I mean, you've been cranking out some wonder-scripts in general. Ones that could possibly be hard-coded into future ZQuest installments... maybe. :Shrugs: I don't know much about Hard-Coding as opposed to scripting.


Well thanks =P

And neither do I I'm afraid.
I have no knowledge of any other kinds of coding, I just thought it'd be good to learn ZScript back in october or so.

#8 LostInHyru1e

LostInHyru1e

    Can you take me as far as PureZC?

  • Members
  • Real Name:Lost
  • Location:Refer to Screename

Posted 11 January 2008 - 06:17 PM

When I get time, I'll try to learn too. Which Tutorial is the best?


#9 Joe123

Joe123

    Retired

  • Members

Posted 11 January 2008 - 06:31 PM

Matthews probably.

(http://www.geocities...ipttutorial.txt that one)

#10 LostInHyru1e

LostInHyru1e

    Can you take me as far as PureZC?

  • Members
  • Real Name:Lost
  • Location:Refer to Screename

Posted 11 January 2008 - 06:39 PM

Okay, I'll check it out later.

#11 Zenith

Zenith

    Old Guard

  • Members

Posted 12 January 2008 - 10:51 PM

Good to know...now I gotta figure out how to put it in ZQuest...I'm cluless when it comes to these scripts... icon_confused2.gif

Edited by zmaster, 12 January 2008 - 10:51 PM.


#12 Joe123

Joe123

    Retired

  • Members

Posted 13 January 2008 - 06:40 AM

Ahhh, there should be a tutorial on this I can direct people too, I never seem to remember where there is one, and I end up typing it out at least twice a week.

Anyway icon_smile.gif

Open up 'Notepad'.

On the first line, write:
CODE
import "std.zh"


Then, leave a line and copy in the script.

Go to 'Save As', and then type in '####.z', and in the box where it says 'filetype', change it from '.txt', to 'All Files', then press 'OK'.

Go to ZQuest; Tools->Scripts->Compile ZScript.

Click 'Load', and find the file you just made.

Press 'Compile', and then click on the 'Item' tab.

The name of the script should appear on the right hand side.

Select it and press the '<<' button to copy it over into a slot.


Then, to apply it to an item:

Open the item in the Item Editor.

Go to the 'Pickup' tab.

In the box where it says 'Script', type the number of the slot that you applied the script to.

In the 'Arguments' tab, put for 'D0', the number of the string you want to play.

#13 Zenith

Zenith

    Old Guard

  • Members

Posted 14 January 2008 - 11:38 PM

Good to know. 'Cause something tells me this won't be the only script I'm gonna end up using...

#14 Joe123

Joe123

    Retired

  • Members

Posted 15 January 2008 - 03:07 AM

And if you're going to use more than one script, make sure to copy them all into the same .z file, you can't have more than one buffer.

#15 ZebraStallion

ZebraStallion

    Follower of Destiny

  • Members

Posted 15 January 2008 - 03:59 PM

Wow, I put this into my quest, (first script I actually got to work icon_confused.gif,) and it's really smooth. icon_biggrin.gif


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users