Runga_Kutta, The Reader
Member Since
Last Activity
EXP Points
Post Count
Storygame Count
Duel Stats
Order
Commendations
Storygames
This is just me goofing around with the advanced story editor. Testing out some javascript. Nothing impressive at the moment.
You are not some mastermind with a great divine plan; you are bored. And finding something productive to do would provide far more entertainment than twiddling your thumbs for eons without end. You have a chance to create worlds. The laws by which the universe functions are at your command.
What do you do?
((This is intended as a small demo, more or less; this is the first story this author has written))
Recent Posts
Master Script: on 4/7/2016 12:33:32 AMOk. So to do what I am trying to do, here is what needs to be done:
In the globalPage script you can place this code in there:
----------------------
$PAGETEXT := $PAGETEXT + "
"
------------------------------------------
Basically this can act as a stand-in for any of the more complex behavior that you want to run.
So for everyone who offered advice and encouragement on this thread: Thank you.
Master Script: on 4/7/2016 12:01:05 AM
I want functions that I can save somewhere, then refer back to.
My test cases haven't worked yet.
function determine_location() {
// ... logic ...
}
Ah, this discusses the issue: http://chooseyourstory.com/help/articles/article.aspx?ArticleId=105
Master Script: on 4/6/2016 11:38:02 PM
Well, I guess that means that I will have to play with it and figure out how I can do that.
Master Script: on 4/6/2016 11:10:52 PM
It sounds like interactions between HTML are possible. Does this mean that javascript could be used to handle more advanced behaviors and embed it into the story?
Master Script: on 4/6/2016 10:30:17 PM
Hi there. In more advanced programming languages, there exists functions and object oriented programming.
You can define classes that act as entry points to your function.
class BeginStory
def entryFunction
%Dest : = 1
%HP := 10
end def
end class
And to execute this bad boy, you can create an object:
$object := new $BeginStory
$object.entryFunction
But it doesn't appear that any such behaviors exist in the advanced scripting editor. So what acts as the entry point for the adventure when it begins? Do functions exist?