whdmusic wrote: Sat Feb 11, 2023 11:10 pm
Hello
It is a very old Subject, hopefully someone is still reading this.
I try to make a snakes and ladders tease by script
engine.
Why not in EOS Tease? Because I don't like the picture size which in my opinion is too small on EOS.
Second, with offline tease, I could do it with videos instead of pictures, which I may include later.
Is there a possibility to work with arrays in the script? I get errors which say, my array is not defined. I used JSript naming for the arrays:
e.g. EdgeList.splice(1, 0, Girl<GirlNumber>) to add Girlx to the array and later
EdgerGirlPosition = EdgeList.indexOf(Girl<GirlNumber> ,-1) to find out if the array EdgeList does contain Girlx.
Cheers
whdmusic
Hi, and thanks for the interest in the script
engine. The picture size is my biggest complaint with EOS as well.
What you want is sort of possible (more below). The latest script
engine version released does not support arrays directly, but I have actually been looking into adding that support for myself recently. I can't make any promises on when it might happen though. I'm trying to get a newer version released (I've made a lot of improvements over time) but time and motivation are an issue.
The way you could do it though is to include some javascript functions in the <GlobalJavascript> section of your tease, then use those functions in your script. For example, write an addGirl() function that does what you need, then in your script you can say
Code: Select all
Girl = "Marcy"
temp = addGirl(Girl)
To get a girl you would write a getGirl() function then use something like
Code: Select all
EdgerGirlPosition = getGirl(GirlNumber)
Or
EdgerGirlPosition = getGirl("Marcy")
I can't remember exactly what was supported in version 1.53, but I have a much newer and more advanced version of the script
engine I would be happy to share with you. In fact I'm willing to just post it as-is for anyone that's interested and then answer questions and deal with issues later. My current version is much better than the previous version.
I'm away on vacation at the moment so wouldn't be able to do anything until next week probably, but let me know your thoughts. This could help get me moving on that long overdue update.
Hope those ideas help, and I'm happy to help further, but like I said I'm away and you'll have to be patient. I only checked in this morning because I had a bit of time to kill. I'll be back home late this week, and more settled and back into the swing of things next week.
Cheers,
PG