If you're like me looking for answers, you can try to start here
viewtopic.php?f=2&t=4355
viewtopic.php?f=2&t=1033
https://milovana.com/help/flashtease/cmd.php?range
I have been trying to figure out how to create a random outcome in Nyx.
Some people have tried to help me with this, but So far I havn't been able to understand it.
Two things i'd like to understand.
1. How to edit the text in nyx to create a random outcome
2. How to write the 'set' and 'unset' function in nyx
If you will, edit the text from page 2 to jump to a range for pages 3 to 5
2#page(
'<TEXTFORMAT LEADING="2"><P ALIGN="CENTER"><FONT FACE="FontSans" SIZE="18" COLOR="#FFFFFF" LETTERSPACING="0" KERNING="0">p2</FONT></P></TEXTFORMAT>',
pic("*.jpg"),
go(3#)
);
3#page(
'<TEXTFORMAT LEADING="2"><P ALIGN="CENTER"><FONT FACE="FontSans" SIZE="18" COLOR="#FFFFFF" LETTERSPACING="0" KERNING="0">p3</FONT></P></TEXTFORMAT>',
pic("*.jpg"),
go(4#)
);
4#page(
'<TEXTFORMAT LEADING="2"><P ALIGN="CENTER"><FONT FACE="FontSans" SIZE="18" COLOR="#FFFFFF" LETTERSPACING="0" KERNING="0">p4</FONT></P></TEXTFORMAT>',
pic("*.jpg"),
go(4#)
);
5#page(
'<TEXTFORMAT LEADING="2"><P ALIGN="CENTER"><FONT FACE="FontSans" SIZE="18" COLOR="#FFFFFF" LETTERSPACING="0" KERNING="0">p5</FONT></P></TEXTFORMAT>',
pic("*.jpg"),
go(5#)
);
Random outcomes in Flash (Nyx)
-
- Explorer At Heart
- Posts: 116
- Joined: Mon Jun 01, 2015 7:44 pm
- Gender: Female
- Sexual Orientation: Straight
- I am a: Domme (Female)
Re: Random outcomes in Flash (Nyx)
Answer for random pages
- Spoiler: show
- lolol2
- Explorer At Heart
- Posts: 507
- Joined: Mon Feb 20, 2017 10:33 am
- Gender: Male
- Sexual Orientation: Straight
Re: Random outcomes in Flash (Nyx)
It is not so hard to understand, the code is more the problem, you have to combine the commands to get it work.
First!
You have to do this with the script editor, I think this is not possible with the normal editor.
And by the way I would always recommend this. ;)
A very important thing is that the range command can only trigger a number once.
So when the "1" was picked it is set and can't get triggered again, this set stays in the session.
So if you make a preview and trigger one/every number, you have to reload the browser to unsed the numbers again!
This is the most reason why people struggle, because there script works only once.
Here a short examle for a random generator, I shorted the text a bit, but works without problem in the editor.
(Don't forget to reload the browser before trying)
After all three pages were triggered the start page stops working, this is the expected behavior.
Reload the browser and it is working again until every page was triggered again.
To enhance this a bit you can set and unset the pages on your own.
Page 3 unset itself and will be triggered every time again after 1 and 2 were triggered too.
So if you want that your script don't stop unexpected, keep in mind that there must be every time an untriggered number when the range command is used.
With this easy but useful commands you can make an ending complete random or depending on decisions which were done long before.
For example you implement a range 1-3 like the example with 3 different ending.
If you set 1 and 2 on the first page on your tease, then you will run into the ending 3.
If the user triggers a special page or button in your script later you can set page 3 and unset page 1 or 2 to change the ending.
So you are able to make an ending that depends on the decisions, this is mostly more fun than just "stupid" random endings. ;)
One last thing, it is not possible to combine every commands in one action, so if it get to complexe and don't work you can implement "ghost" pages like this with a delay of 0 sec so they won't be displayed but the set and/or unset command will be done.
I hope that helped a bit, got more complexe than I thought.
Edit: Oh and one more thing.... if you unset a page more than once in your script you have to set it the same times to make it work again. The same with the set command.
So be careful if you set/unset the same pages more than once in the script, if the user triggers both you can get an unexpected behavior.
First!
You have to do this with the script editor, I think this is not possible with the normal editor.
And by the way I would always recommend this. ;)
A very important thing is that the range command can only trigger a number once.
So when the "1" was picked it is set and can't get triggered again, this set stays in the session.
So if you make a preview and trigger one/every number, you have to reload the browser to unsed the numbers again!
This is the most reason why people struggle, because there script works only once.
Here a short examle for a random generator, I shorted the text a bit, but works without problem in the editor.
(Don't forget to reload the browser before trying)
start#page(
'Random page will be selected',
pic("*.jpg"),
go(range(1,3,'page'))
);
1#page(
'Page 1',
pic("*.jpg"),
buttons(start#,"Go back")
);
2#page(
'Page 2',
pic("*.jpg"),
buttons(start#,"Go back")
);
3#page(
'Page 3',
pic("*.jpg"),
buttons(start#,"Go back")
);
After all three pages were triggered the start page stops working, this is the expected behavior.
Reload the browser and it is working again until every page was triggered again.
To enhance this a bit you can set and unset the pages on your own.
start#page(
'Random page will be selected',
pic("*.jpg"),
go(range(1,3,'page'))
);
1#page(
'Page 1',
pic("*.jpg"),
buttons(start#,"Go back")
);
2#page(
'Page 2',
pic("*.jpg"),
buttons(start#,"Go back")
);
3#page(
'Page 3',
pic("*.jpg"),
action:vert(e0:buttons(start#,"Go back"),unset(3#)),
);
Page 3 unset itself and will be triggered every time again after 1 and 2 were triggered too.
So if you want that your script don't stop unexpected, keep in mind that there must be every time an untriggered number when the range command is used.
With this easy but useful commands you can make an ending complete random or depending on decisions which were done long before.
For example you implement a range 1-3 like the example with 3 different ending.
If you set 1 and 2 on the first page on your tease, then you will run into the ending 3.
If the user triggers a special page or button in your script later you can set page 3 and unset page 1 or 2 to change the ending.
So you are able to make an ending that depends on the decisions, this is mostly more fun than just "stupid" random endings. ;)
One last thing, it is not possible to combine every commands in one action, so if it get to complexe and don't work you can implement "ghost" pages like this with a delay of 0 sec so they won't be displayed but the set and/or unset command will be done.
start1#page(
' ',
pic(*.jpg),
action:vert(e0:delay(time:0sec,target:start2#,style:normal),set(1#,2#)),
);
I hope that helped a bit, got more complexe than I thought.
Edit: Oh and one more thing.... if you unset a page more than once in your script you have to set it the same times to make it work again. The same with the set command.
So be careful if you set/unset the same pages more than once in the script, if the user triggers both you can get an unexpected behavior.
My creations:
- Spoiler: show
Re: Random outcomes in Flash (Nyx)
Very well written lolol2, that sums it up quite nicely, but I have a few things to add.
You do not have to reload the browser to reset the set-flags. The preview mode of nyx has a Reset button for this
That's a simplified example from one of my first teases I've written in nyx. You can see that I set and unset several pages.
My latest teases I have written with philo's offline editor and used the generate nyx script function. It works quite fine and just needs a little tweeking to make the tease work in nyx.
After looking up how the script looks like which was generated I must realize that the mult command isn't even necassary.
Here's an example:
Edit: It looks like the code-tag is broken
You do not have to reload the browser to reset the set-flags. The preview mode of nyx has a Reset button for this
I think that's not true. As far as I know a page can either be set or unset, it's a true or false property. If you unset a page which is already unset it stays unset and only one set is needed to change it to set.if you unset a page more than once in your script you have to set it the same times to make it work again. The same with the set command.
That's also not true. There is the 'mult' command which let's you combine many different actions.One last thing, it is not possible to combine every commands in one action
That's a simplified example from one of my first teases I've written in nyx. You can see that I set and unset several pages.
Code: Select all
R17#page(
'text',
pic("pic.jpg"),
mult(set(33#,29#,30#),unset(19#,20#,21#,27#,28#),
buttons(T21#, "Text", T23#, "Text2"))
);
After looking up how the script looks like which was generated I must realize that the mult command isn't even necassary.
Here's an example:
Code: Select all
48#page('',pic("pic.jpg"),delay(0sec,T50#,style:hidden),unset(48#));
Cock Hero - Overwatch 3 is out! viewtopic.php?f=25&t=22817
- lolol2
- Explorer At Heart
- Posts: 507
- Joined: Mon Feb 20, 2017 10:33 am
- Gender: Male
- Sexual Orientation: Straight
Re: Random outcomes in Flash (Nyx)
Is this button working for you?
I expected the same function but my set flags stays after hitting this button, if I trigger once all numbers I still get the " Error: Range failed: All actions set!" message after hitting reset, only reload the browser helps.
But maybe some issue with my browser or flash version...
I read about this in the nyx help threat, never tried exactly on my own... sorry if this is not true.
viewtopic.php?f=2&t=4355&start=30
8th post on this site, maybe it was fixed in a later release of the nyx editor.
I struggled to combine the mult command with audio, deplay and buttons, maybe it is possible.
Just wanted to show a little trick to trigger the set and unset commands without building these long actions.
Yeah the code quote is not working as expected, better use the normal quotes in this forum fore code.
My creations:
- Spoiler: show
Re: Random outcomes in Flash (Nyx)
I just tried it. You are right the set flags are not removedlolol2 wrote: ↑Wed Jul 05, 2017 10:07 am Is this button working for you?
I expected the same function but my set flags stays after hitting this button, if I trigger once all numbers I still get the " Error: Range failed: All actions set!" message after hitting reset, only reload the browser helps.
But maybe some issue with my browser or flash version...
I've never noticed. I usually set/unset pages of the tease on the start page. I must have developed this habit because of this bug and then forgot about it
That thread is very old and right after the post you mentioned nerzhul is saying that he did not encounter this. I have some teases where I use set/unset a lot and I am very sure that there is not a counter in the background.lolol2 wrote: ↑Wed Jul 05, 2017 10:07 am I read about this in the nyx help threat, never tried exactly on my own... sorry if this is not true.
viewtopic.php?f=2&t=4355&start=30
8th post on this site, maybe it was fixed in a later release of the nyx editor.
This is a very good trick and I also use it often. Sometimes this trick is essential. For example when using the range command for buttons. As far as I know buttons don't support the range command (exception is the continue button), so a 0sec delay page works around this problem. I use for these 0s delay pages a small "black.jpg" to prevent flickering and reduce lag. If you use "*.jpg" a random picture is loaded.
Cock Hero - Overwatch 3 is out! viewtopic.php?f=25&t=22817
-
- Explorer At Heart
- Posts: 116
- Joined: Mon Jun 01, 2015 7:44 pm
- Gender: Female
- Sexual Orientation: Straight
- I am a: Domme (Female)
Re: Random outcomes in Flash (Nyx)
This explains a lot.
A page is set when it is visited
A page can be unset by using the unset function
When you set and unset too many things in one page it might not work, in this case implement a ghost page with a 0 delay timer
What about the ifset function? I want to allow the ending if the user has visited the special page
and where do you get this script editor?
A page is set when it is visited
A page can be unset by using the unset function
When you set and unset too many things in one page it might not work, in this case implement a ghost page with a 0 delay timer
What about the ifset function? I want to allow the ending if the user has visited the special page
and where do you get this script editor?
Re: Random outcomes in Flash (Nyx)
Thread of the offline editor: viewtopic.php?f=2&t=10941
In the TeaseMe Thread are also a few tools linked viewtopic.php?f=26&t=6993
I don't know if ifset works in nyx. My workaround for this is, that I set the specific page on the start page. The page which unlocks the ending has an unset for the specific page.
In the TeaseMe Thread are also a few tools linked viewtopic.php?f=26&t=6993
I don't know if ifset works in nyx. My workaround for this is, that I set the specific page on the start page. The page which unlocks the ending has an unset for the specific page.
Cock Hero - Overwatch 3 is out! viewtopic.php?f=25&t=22817
Who is online
Users browsing this forum: No registered users and 18 guests