[development] Technical Forms - EOS version
Posted: Tue Jan 14, 2020 10:19 pm
Hi all,
I would like to share what I recently did in EOS editor. Some time ago user Rinascere created a tease app called Technical forms. App also has origin in other tease with the same name created by figroll.
On my side: I worked on recreating a sample commands in EOS tease and I finished that part. I'm not so good in creating a stories, but if you would like to help in a process or create your own game, you can work with my scripts.
Here is what you have to add to "init script" section:
That part is going to each page. It contains sounds that we want to play one after another.
First section with stop() functions are used to preload sounds.
Next section takes sound IDs specified in Audio:Play action
Last line with function playList is playing sounds one after another and stop after last one.
Here is how it looks in EOS editor. There are few sounds added, each with ID and Eval at the end.

I'm also adding a screenshot with how I set ID to sound, because I found it hard to do at beginning.

Pack of audio samples is available here
https://gofile.io/?c=GhTTgR
That is basicaly everything. Please let me know about any issues. If you didn't see Technical Forms by Rinascere, please see URL below.
viewtopic.php?f=26&t=21898
I would like to share what I recently did in EOS editor. Some time ago user Rinascere created a tease app called Technical forms. App also has origin in other tease with the same name created by figroll.
On my side: I worked on recreating a sample commands in EOS tease and I finished that part. I'm not so good in creating a stories, but if you would like to help in a process or create your own game, you can work with my scripts.
Here is what you have to add to "init script" section:
Code: Select all
var listOfSoundsWithListener = []
function wait(ms){
var start = new Date().getTime();
var end1 = start;
while(end1 < start + ms) {
end1 = new Date().getTime();
}
}
function playList(list){
for(i = 0; i< list.length-1; i++)
{
if(!InList(listOfSoundsWithListener,list[i])) {
listOfSoundsWithListener.push(list[i])
console.log('added '+list[i])
listToPlay = list
Sound.get(list[i]).addEventListener('end',function(){
playNext(listToPlay)
}
)}
}
Sound.get(list[0]).play()
}
function playNext (list) {
wait(100)
list.shift()
if(list.length> 0){
console.log('playing now: '+list[0])
Sound.get(list[0]).play()
}
}
function InList(array, toFind){
for(var i = 0; i < array.length; i++) {
if (array[i] == toFind) {
console.log(true)
return true
}
}
console.log(false)
return false
}
First section with stop() functions are used to preload sounds.
Next section takes sound IDs specified in Audio:Play action
Last line with function playList is playing sounds one after another and stop after last one.
Code: Select all
Sound.get('cat4').stop()
Sound.get('dog4').stop()
Sound.get('emma_begin').stop()
Sound.get('emma_stop').stop()
Sound.get('emma_dog').stop()
Sound.get('emma_cat').stop()
var list = [
'emma_begin',
'emma_dog',
'dog4',
'emma_cat',
'cat4',
'emma_stop'];
playList(list)

I'm also adding a screenshot with how I set ID to sound, because I found it hard to do at beginning.

Pack of audio samples is available here
https://gofile.io/?c=GhTTgR
That is basicaly everything. Please let me know about any issues. If you didn't see Technical Forms by Rinascere, please see URL below.
viewtopic.php?f=26&t=21898