Jump to content

Photo

Combined Global script ''name''


  • Please log in to reply
11 replies to this topic

#1 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 21 March 2017 - 08:50 PM

Hello everyone i had a question that i did no find the responses on my question.

When you combine the global script you must give at your global script a name for all scripts names on the list ? like ''Slot 2'' or ''Combined script'' or that is coded like that ? Because i have a Moving platform and a new ghost script that the slot name is ''GhostZHActivescript'' on the scripts choice i suppose that is a combined script since they need Ghost.zh. If i do want exemple to combine all scripts files on the same name that will works if i separate script with 

----------------------SCRIPTNAME--------------------

or it's just impossible with a ''script separate'' ?



#2 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 22 March 2017 - 01:15 AM

ZC doesn't care what you call it, as long as you assign the script to a slot.

#3 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 22 March 2017 - 08:46 AM

alright then

#4 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 26 March 2017 - 10:44 PM

alright then


If you did not know, the 'active' global script is the one that runs during the game at all times and its ID is slot 2.

There are four total global slots:

Init
Active
OnContinue
OnExit.

People will typically indicate which script slot to use by name when submitting one for general use

#5 cavthena

cavthena

    Apprentice

  • Members
  • Real Name:Clayton
  • Location:I wish I knew

Posted 27 March 2017 - 09:56 AM

Init is the exception to the rule. It must be named Init in order for it to be accepted. Although I've never been able to get Init to work or at least not noticeably.

Is there a trick to that one?

#6 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 27 March 2017 - 09:21 PM

Init is the exception to the rule. It must be named Init in order for it to be accepted. Although I've never been able to get Init to work or at least not noticeably.

Is there a trick to that one?

 

The script must have this exact naming:

global script Init {

It runs for one instance when the game first loads, on a clean save slot. If it is not running, please submit a bug report. It is certainly possible that we missed a glaring issue, as few users utilise that feature, and fewer report issues. :D

 

Ignore the '~' in the slot description. It is exceptionally misleading, often convincing users that any script name starting with 'Init' will be appended, which is not true. It is possible that might have been an initial intention, but if so, it was never realised.

 

We discussed allowing multiple init scripts, which would all run in sequence at the head of a new game. Any thoughts on that being useful?


Edited by ZoriaRPG, 27 March 2017 - 09:24 PM.


#7 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 27 March 2017 - 09:27 PM

i have a question: What ''on continues'' and ''on exit'' actions does ?

#8 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 27 March 2017 - 11:50 PM

i have a question: What ''on continues'' and ''on exit'' actions does ?

 

OnExit runs whenever the Continue/Save/Retry screen appears. (Technically, one frame prior to that screen.) Use it to clan up values prior to saving, continuing, or retrying.

 

OnContinue runs whenever the player runs the quest from a save file, starting after the player first saves the game. It is similar to Init, but runs from an existing save slot. Can be useful if you change values in a quest update and want to protect existing saves. Init is for the first time a player loads a quest, and OnContinue is every load thereafter.

 

If a player does not save, or if you have saving disabled, then this script will never run.

 

You could use OnExit to write Link's HP to an array when a player presses F6, and OnContinue to set the saved HP when the game resume from a saved file.


Edited by ZoriaRPG, 27 March 2017 - 11:53 PM.


#9 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 28 March 2017 - 12:55 AM

hum i see exemple if i do want a specific script that run the game must saved and i must restart the saving quest leaving the quest after saving or dies for exemple a multiple times like the Rebirth Isle does on the starting quest ?

#10 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 30 March 2017 - 10:44 PM

and for the ''Init~'' slots working at the same thing as the ''Active'' slot ?
Also if i want to put ''Init~'' exemple for all ghost script type and if i put it on ''Init~'' slot then that will works as the ''active'' slot script ?

Edited by Cedric, 30 March 2017 - 10:46 PM.


#11 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 31 March 2017 - 02:18 AM

and for the ''Init~'' slots working at the same thing as the ''Active'' slot ?
Also if i want to put ''Init~'' exemple for all ghost script type and if i put it on ''Init~'' slot then that will works as the ''active'' slot script ?


No. The Init script runs exactly one time, when a quest is first loaded into a clean save slot. Thereafter, it never runs again.

#12 Sans

Sans

    Hey kid wanna buy hot dogs ?

  • Members
  • Location:Judgement Hall

Posted 31 March 2017 - 05:34 AM

ah alright


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users