Jump to content

Photo

Help with the basics


  • Please log in to reply
7 replies to this topic

#1 Flynn

Flynn

    ZC Fan

  • Members
  • Location:Oregon USA

Posted 12 February 2021 - 12:28 PM

So my taste in custom quests usually favors the straight up NES style, and I've been happy with the couple of quests that I've been able to make without any scripts. Throughout my school career I've learned that my brain isn't suited for learning languages and I know I'll probably never write even the most basic script. That said, I would like to experiment with a couple of simple scripts. I'm pretty good at following directions and I've found a few short tutorials around here, but to this day I've never been able to make one work, and I can't figure out what I'm doing wrong.

 

I would be most appreciative if someone would post the steps that a noob like me could follow for utilizing the most basic script. I'm using 2.55 with the old basic NES tileset. I don't really care what the script is - maybe just an updated enemy or that one that shakes the screen when a bomb is used. If I could see it work just once, I would be encouraged to try more.



#2 Jamian

Jamian

    ZC enthusiast

  • Members

Posted 12 February 2021 - 01:03 PM

Here is an example of a very basic script, which plays the secret sound as the player enters a screen:

ffc script PlaySfx{
	void run(){
		Game->PlaySound(27);
	}
}

Paste that in a .z file with the ever important line :

#include "std.zh"

at the top.

 

In ZQuest, go to ZScript > Compile ZScript..., then click "Load", find your file, and compile it. 

 

In the menu that should appear next, make sure you're on the "FFC" tab, find your script in the right window, and click the << button to assign it to FFC slot 1 in the left window. Click OK.

 

You now have an FFC script ready to be used. Add an FFC to the screen you want to use it on. In the FFC menu, click on the "combo" black square to change the combo, and set it to any invisible combo that is not combo 0 (FFC scripts won't run if the default combo 0 is assigned to them). In the classic tileset, I believe combo 1 will do. In the "Script" combobox at the bottom, select your script. Click OK.

 

If all went well, the secret sound will play when you enter the screen. This isn't a useful script, but being able to get it to work will make sure you are setting scripts up correctly.


Edited by Jamian, 12 February 2021 - 01:04 PM.


#3 Flynn

Flynn

    ZC Fan

  • Members
  • Location:Oregon USA

Posted 12 February 2021 - 02:55 PM

Well, now I need help making a .z file to paste into. I'm using windows 7 and I have 7-zip if that helps...



#4 Mitchfork

Mitchfork

    no fun. not ever.

  • Members
  • Real Name:Mitch
  • Location:Alabama

Posted 12 February 2021 - 03:09 PM

.z is just an extension for ZQuest - the file is an ordinary text file. Just save a file in Notepad (or better Notepad++) but manually type the .z extension instead of .txt like normal.

#5 Jamian

Jamian

    ZC enthusiast

  • Members

Posted 12 February 2021 - 03:18 PM

Yes, a .z file is just an ordinary text file with the .z extension. Technically, you can also type your script in ZQuest directly, but it's not recommended for all kinds of practical reasons.



#6 Flynn

Flynn

    ZC Fan

  • Members
  • Location:Oregon USA

Posted 12 February 2021 - 03:25 PM

Okay, got as far as assigning it to FFC slot 1, but can't find the FFC menu.



#7 Jamian

Jamian

    ZC enthusiast

  • Members

Posted 12 February 2021 - 04:23 PM

For that you can either:

 

- Go to Screen > Freeform Combos

- Press F7 (it's a shortcut for the same thing)

- Ideally select the combo you want to use for the FFC, then right click and choose "Place + Edit FFC 1" (the FFC's combo will be assigned to your selected combo)

 

I prefer the last option as it tends to save time when you are used to it, but all options work.



#8 Flynn

Flynn

    ZC Fan

  • Members
  • Location:Oregon USA

Posted 12 February 2021 - 09:44 PM

Thanks, peeps. Baby steps for you but one giant leap for me.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users