Jump to content

Photo

Functions for scripted subscreen


  • Please log in to reply
4 replies to this topic

#1 idontknow8

idontknow8

    Senior

  • Members

Posted 17 February 2018 - 07:17 PM

What are all the possible functions (as well as pointers & attributes) that you can use for a scripted subscreen?  I wanna see what's possible and look into how I might script a subscreen.



#2 Saffith

Saffith

    IPv7 user

  • ZC Developers

Posted 19 February 2018 - 11:13 AM

There isn't anything in ZScript specifically intended for subscreens.
You need to know how to freeze the screen - set two FFCs to combos of "Screen Freeze (Except FFCS)" and "Screen Freeze (FFCs Only)." It's a good idea to reserve two FFC numbers just for this purpose.
Aside from that, you mainly just need to use drawing functions and input handling. You'll probably also want to check Link->Item[] to see what items Link has, and you can use SelectAWeapon() and SelectBWeapon() to change the A and B button items.
There isn't a simple way to draw an item. You could create actual items on the screen and disable their collision detection. Or you could set up combos corresponding to each item you want to draw, so to draw item i, you'd draw combo ITEM_COMBOS+i or something.

That's pretty much it. There's a lot you can theoretically do with a scripted subscreen, but you're on your own. The language doesn't offer any particular support.

#3 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 19 February 2018 - 07:08 PM

You are welcome to poke around in my subscreen code, to see how I did some of this.

It uses some new stuff, but the general model is applicable to ZC 2.50.x.

ZoriaRPG, Scripted Subscreen, v8

#4 judasrising

judasrising

    I play guitar

  • Members
  • Location:Sweden but born in Finland

Posted 19 February 2018 - 10:33 PM

You are welcome to poke around in my subscreen code, to see how I did some of this.
It uses some new stuff, but the general model is applicable to ZC 2.50.x.ZoriaRPG, Scripted Subscreen, v8


Do you mind if i also poke around with it,it is a good way to learn stuff like that also

#5 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 22 February 2018 - 04:12 AM

Do you mind if i also poke around with it,it is a good way to learn stuff like that also


Feel free. It's posted in a public venue. ;)


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users