I am trying to use a switch case to determine which image from a gallery or files to use. I want to do this instead of a lengthy nested "if else" statement where I put an image under the "if-then" statement and create another "If Action" under the "if-else" statement.
Is there the equivalent to "pages.goto(pageName)" for images, or am I out of luck? My knowledge of JavaScript isn't great so try to stay patient with me if there is a complex workaround.
I am using OEOS as well, if that has any options.
I'm trying to avoid first picture by doing some equivalent process in the second picture.
EOS HELP Bypassing an "Image Action" by using an "Eval Action"
-
- Explorer At Heart
- Posts: 203
- Joined: Thu Feb 28, 2019 3:30 pm
- I am a: Switch
Re: EOS HELP Bypassing an "Image Action" by using an "Eval Action"
Vanilla EOS does not have an option for this, and it's annoying sometimes. OpenEOS does. https://github.com/fapnip/openeos/wiki/ ... ad-onerror
Auto: Replaces selected instances of the word "not" with the word "definitely".
-
- Explorer
- Posts: 38
- Joined: Fri Sep 29, 2017 8:35 am
Re: EOS HELP Bypassing an "Image Action" by using an "Eval Action"
Sadly, you can't do that with javascript since the js functions we can use are limited and we don't have access to the DOM.
On the other hand, you don't need to nest your if statements.
You can use :
if(attack === 'normal') image1
if (attack === 'weak and helpful') image2
Without using the else statement.
On the other hand, you don't need to nest your if statements.
You can use :
if(attack === 'normal') image1
if (attack === 'weak and helpful') image2
Without using the else statement.
Re: EOS HELP Bypassing an "Image Action" by using an "Eval Action"
Thanks for the help! I'll try this out and see how it works.RemiHiyama wrote: ↑Fri Feb 18, 2022 5:00 am Vanilla EOS does not have an option for this, and it's annoying sometimes. OpenEOS does. https://github.com/fapnip/openeos/wiki/ ... ad-onerror
If OEOS turns out to be tedious, I will definitely use this method instead! Thanks!Domi-nation wrote: ↑Fri Feb 18, 2022 10:07 am Sadly, you can't do that with javascript since the js functions we can use are limited and we don't have access to the DOM.
On the other hand, you don't need to nest your if statements.
You can use :
if(attack === 'normal') image1
if (attack === 'weak and helpful') image2
Without using the else statement.
Who is online
Users browsing this forum: No registered users and 3 guests