script <scriptName> { } script {
msg <Blah, blah, blah.>
scriptName
}
define procedure <shoals_killer_widget_script>
.... put all the ASL commands etc you want here....
end define
do <shoals_killer_widget_script>
doaction <name_of_object;name_of_action>I suggest functions myself - much more programmatically (new word?) correct.
You can effectively 'give' your 'script' bits to do things with.
Like mathmatical functions.
You can pass a parameter to a procedure?
I remember trying - and failing - using procedures.. Perhaps I'm doing it wrong?
do <action(1;2;3)> ?
' Quest 3.5 ASL Template
define game <Game Name>
asl-version <350>
gametype singleplayer
game version <1.0>
game author <Your Name>
game copyright <© 2004 ...>
game info <Enter any additional information about this game here.>
start <Start Room>
end define
define room <Start Room>
look <A start room>
script {
set numeric <count;5>
set string <descrip;widgets>
do <test(9;%count%;#descrip#)>
}
end define
define procedure <test>
set string <stuff;>
set <stuff;The $parameter(1)$ $parameter(3)$ are in $parameter(2)$ boxes>
msg <#stuff#>
end define
define text <intro>
Enter intro text here
end define
define text <win>
Enter win text here
end define
define text <lose>
Enter lose text here
end define