Jump to content


Photo

Subroutine Vs. Not Active


  • Please log in to reply
4 replies to this topic

#1 Sleetil

Sleetil
  • Members
  • 140 posts

Posted 28 August 2010 - 08:02 PM

What is the difference between a script which is subroutine, and one that isn't active?

#2 Retharias

Retharias
  • Members
  • 196 posts
  • Location:California, United States
  • Projects:Wars of Arda, Dol Guldur--Unfinished Version, Expanded Helm's Deep with Glittering Caves
  •  Mapper for WoA

Posted 28 August 2010 - 09:29 PM

If i'm right about this, then a subroutine is kinda like a script within a script, becoming active only when certain requirements are met, or when the parent script is completed.

A non-active script won't run at all... or at least, not until its MADE active either manually in WB, or automatically by means of another script.

Ash nazg durbatulûk, ash nazg gimbatul, ash nazg thrakatulûk agh burzum-ishi krimpatul.

One Ring to rule them all, One Ring to find them, One Ring to bring them all and in the Darkness bind them.


Posted Image

#3 Puzzler33

Puzzler33
  • Members
  • 226 posts

Posted 29 September 2010 - 03:34 PM

I think subroutine is just supposed to be a quicker way of having an activating then deactivating (once complete) script work multiple times, where as you would have to make the not active script deactivate itself at the end of its chain of consequences (sometimes IF False as well). Basically subroutine isn't necessary but it can make things simpler.

Edited by Puzzler33, 29 September 2010 - 03:36 PM.

Posted Image

#4 Sleetil

Sleetil
  • Members
  • 140 posts

Posted 05 October 2010 - 03:38 AM

At Rokqua Shadowkin/Puzzler33:
All right. Thanks for the help!
Clarification on one thing though... I think this is what you said in your post, Puzzler33, but I'm not completely clear..
Even if the conditions of a subroutine script are met, if the script is run, it will only run once in total, or..?

Edited by Sleetil, 05 October 2010 - 03:39 AM.


#5 Puzzler33

Puzzler33
  • Members
  • 226 posts

Posted 07 October 2010 - 09:23 PM

It depends on whether you make it deactivating and what your consequences are. If you do not have it deactivating then it will run once through, and again if triggered a second or subsequent time. (Logically this shouldn't happen for subroutine scripts which are deactivating but I haven't tried it so they might have the same behaviour - otherwise what would be the point of a deactivating subroutine script?)
Posted Image




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users