Category talk:Example Scripts

Jump to navigationJump to search

Is there a way to make a script that allows you to display number(s) based on variables anywhere on-screen?

The Mad Cacti: You can do this with strings and the append number command. First, this is how you display a string onscreen:

$ 0 ="This is string ID. 0"
# display at x=10, y=160
show string at (0, 10, 160)

And this is how you put the value of a variable named my var into a string and display it.

# First we wipe string #0, because appendnumber APPENDS to the existing string
clear string (0)
append number (0, my var)
show string at (0, 10, 160)

By the way, you can post plotscripting questions in the plotscripting help forum on Castle Paradox. More people will read them in there. You don't have to register to post in that forum.

BMR (talk) 10:47, 11 July 2013 (PDT) -- Diamond-square algorithm for generating terrain. Do you guys think that's generic enough and/or of enough potential use to enough people for me to go ahead and clean up my code for it and post it here? It is a pretty niche thing, so it might not be worth it. Then again, what do I know, heh.

Bob the Hamster (talk) 18:16, 11 July 2013 (PDT) -- even if the code is niche, I still think is is interesting, and worth posting here.

BMR (talk) 19:06, 11 July 2013 (PDT) -- Righto then, I'll clean the code up and upload it in a few days.