Page 2 of 17

Re: Here are EOS tutorials

Posted: Sun Jan 17, 2021 6:44 pm
by Zofia Little Flame
This may have been asked but I can't seem to find it. Is there a limit to the number of pages. I have a rather ambitious tease in mind that's going to be very large if I can pull it off.

Re: Here are EOS tutorials

Posted: Mon Jan 18, 2021 5:52 pm
by lolol2
I have asked the same question back when EOS was released and the answer was that there is no one.
Only limited by computer hardware but any tease created by a user can't reach those limits.

So start building! :wave:

Re: Here are EOS tutorials

Posted: Thu Feb 04, 2021 12:51 pm
by Fiverson
How do you make buttons asynchronous like you can with the timer? The tease waits for player input but I see everyone has their tease continue playing when a button is on screen. How do they do it?

Sorry if this is super simple i'm new at this.

Re: Here are EOS tutorials

Posted: Thu Feb 04, 2021 4:44 pm
by Darigaaz
Fiverson wrote: Thu Feb 04, 2021 12:51 pm How do you make buttons asynchronous like you can with the timer? The tease waits for player input but I see everyone has their tease continue playing when a button is on screen. How do they do it?

Sorry if this is super simple i'm new at this.
Check 'Notification'. These are buttons that are displayed on the right of the screen while the tease keeps playing. In opposition to 'Choice' which appear at the bottom and block the tease.

Re: Here are EOS tutorials

Posted: Fri Feb 05, 2021 3:43 pm
by Fiverson
Darigaaz wrote: Thu Feb 04, 2021 4:44 pm
Check 'Notification'. These are buttons that are displayed on the right of the screen while the tease keeps playing. In opposition to 'Choice' which appear at the bottom and block the tease.
Thank you! that's exactly what I was looking for :-D

Re: Here are EOS tutorials

Posted: Mon Mar 15, 2021 11:27 pm
by matschbirne
Is there a source of more detailed scripting tutorials? The api is not very helpful...

My main problem at the moment is that i want to mess with the buttons of a choice. The best would be if i could change the colour with jscript, but I don't know how to talk to it. (It's for some settings, activate one or the other)
Another option would be having two buttons and only one being active depending on a variable. It looks like there is a way to do that, but I don't know how and can't find a good source of information for that...

EDIT: Well, as always, figured it out just seconds after posting... Here is the link to the solution, did the same thing, but don't know which mistake I made... (viewtopic.php?f=4&t=23349)

Re: Here are EOS tutorials

Posted: Tue Mar 16, 2021 1:11 am
by fapnip
matschbirne wrote: Mon Mar 15, 2021 11:27 pmThe best would be if i could change the colour with jscript, but I don't know how to talk to it.
As you probably found in that other post, setting visibility of options is about the best you can do.

Another hack is that you can embed <eval>myExpression</eval> in an option label, but currently the JavaScript expression in the eval tag is only evaluated on page pre-load -- and is only evaluated once, on that pre-load, so it's a complicated hack of limited use. (Pages are pre-loaded when they are referenced from the currently displayed page via a goto action, or, if the pages is only referenced by pages.goto(...), just before the page is displayed. The Start page is pre-loaded before the tease started, just after the init script is run.)

You can't currently set background colors of options via expression, but you can emulate it by hiding/showing pre-defined options.

Re: Here are EOS tutorials

Posted: Wed Jun 09, 2021 1:52 pm
by schefflera0101
Hi all,

don't know, if it's been asked before, but I can't find it..

I want to create a litte game with a bet. The player can place a bet and it's been addet to his Capital
Here's what I got:
Eval: Capital=10
Prompt: Bet
//Game running. If player wins:
Eval: Capital=Capital+Bet

Each time I try this, the new Capital is just the old one with the bet (for example Capital old: 10, bet: 5 New Capital: 105)
The Problem is, that Eos doesn't see the Prompt as a number. How can I Transform the Prompt to a number?

Thanks for helping :love:

Re: Here are EOS tutorials

Posted: Wed Jun 09, 2021 3:19 pm
by Drool
schefflera0101 wrote: Wed Jun 09, 2021 1:52 pm Hi all,

don't know, if it's been asked before, but I can't find it..

I want to create a litte game with a bet. The player can place a bet and it's been addet to his Capital
Here's what I got:
Eval: Capital=10
Prompt: Bet
//Game running. If player wins:
Eval: Capital=Capital+Bet

Each time I try this, the new Capital is just the old one with the bet (for example Capital old: 10, bet: 5 New Capital: 105)
The Problem is, that Eos doesn't see the Prompt as a number. How can I Transform the Prompt to a number?

Thanks for helping :love:
Hi, try
Eval: Capital=Capital+Number(Bet)

With isNaN(Bet) you can check if Bet 'is not a number'.

Hope this helps. :-)

Re: Here are EOS tutorials

Posted: Wed Jun 09, 2021 3:31 pm
by schefflera0101
Works perfect.
Thanks a lot! :love:

Re: Here are EOS tutorials

Posted: Wed Jul 21, 2021 2:07 pm
by Epton
How do I use Timer eval?

Re: Here are EOS tutorials

Posted: Wed Jul 21, 2021 5:33 pm
by fapnip
Epton wrote: Wed Jul 21, 2021 2:07 pm How do I use Timer eval?
If you're just asking what to put in for a timer's eval expression, then it's any javascript expression that returns a number of miliseconds you want to run the timer, so 30000 would be 30 seconds, or I think it could take a string like '30s' for 30 seconds.

I don't believe there is any way to use/access a Timer action from an eval in Eos, if that's what you're asking.

Re: Here are EOS tutorials

Posted: Mon Aug 09, 2021 6:25 am
by malaru
Forgotten24 wrote: Sun Aug 08, 2021 11:14 pm I have a question. There are four doors(choiches) decide for one door and you win and you return to the page with 4 doors is it possible that door that you choose is not longer available. If that is possible can someone tell me please how to do that.
Lets say Door 1, Door 2 , Door 3, Door 4. Then you choose Door 4 and you win and next you can choose only Door 1,2 or 3.
I only recently picked up Eos and started writing my own tease, so I'm not sure if this is the most optimal way.
But it should work: (all actions used below are described in the tutorial, so just check there if you are unsure)

- Create a page with 4 buttons
- For each button, check the "hidden" flag for each button and check for a boolean variable e.g. hidden if "button1Pressed==true"
- Make each button go to a seperate page
- On the new page, create an if condition. In the ifcondition it can be checked if its a win (how to check that is up to you, could just use a random chance.)
- If its a win, add a "eval" action that sets the variable "button1Pressed" to true and add a goto action to your reward page. Or just add the reward right here, depends on the complexity of the reward page.
- If its a lose, just add a goto to either a "lose" page or just add some flavor text and go back to the doors.

Re: Here are EOS tutorials

Posted: Thu Oct 21, 2021 3:29 pm
by jonasty01
Question on dynamic content.

In my tease I want people to earn gold. But they won't complete the tease on playing it only once.
They unlock extra pages by getting enough points.
- how do i save the amount of poinst they have on quitingwhen they quit?
I can add points at the end of pages, but how do i put it in tease storage for the next time?

Thanks a lot for the tutorial btw. It got me this far 😂😀

Re: Here are EOS tutorials

Posted: Wed Dec 22, 2021 12:35 pm
by GanyuSimp
Ok but why when I try to preview my tease I only have a black screen and nothing happens? It should work just fine. When I delete ''go to certain page'' action I can preview my first page but after adding it I can't preview my tease. Why?