[TyranoBuilder] Random Event

2 min read
8oni's avatar
By 8oni
7 Favourites
3 Comments
1K Views
Hi :)

So I am planning to make a series of TyranoBuilder tutorial, but I am stuck on some point right now so for now I will make a small tutorial for small stuff that I am able to do in Tyrano right now.
So here is video tutorial about making random event in Tyrano. You can use the same principle for making rolling dice or any other random event.



How it works : there is a var named random that I fill with random number from 1-3 using process variable then using if else I check the value of random.
If it's 1 it go to label B1 and etc.
I name them B1 B2 B3 from Butterfly picture that I am using from here :
commons.wikimedia.org/wiki/Fil…
en.wikipedia.org/wiki/File:Hes…
en.wikipedia.org/wiki/File:Mac…
All links come from Wiki to make things easier, I always respect copyright and I don't want any trouble.

Here is the code in case it's too small to read on the video :

[eval exp="f.Number=f.random"]

[if exp="f.Number ==1"]
[jump storage=scene1.ks target=*B1]
[elsif exp="f.Number == 2"]
[jump storage=scene1.ks target=*B2]
[else]
[jump storage=scene1.ks target=*B3]
[endif]

and

[image storage="default/Butterfly02.jpg" layer=1 page=fore visible=true width="400"  height="400"  pos="center"]

Documentation link :
tyranobuilder.com/tyranoscript…

tyranobuilder.com/tyranoscript…

And you can download the project example here : www.mediafire.com/?cm7sakv5vct…

Please share if you think this is useful and thanks for watching! ^_^
Published:
© 2016 - 2020 8oni
Comments3
anonymous's avatar
Join the community to add your comment. Already a deviant? Log In
Toriichi's avatar
ToriichiHobbyist Digital Artist
aww..thank you so much for tutorial~~
I'll try it soon when i get home... :heart:
8oni's avatar
Glad you like it. There will be more to come :)
Toriichi's avatar
ToriichiHobbyist Digital Artist
hurray~~~
notify me as your follower, mastaaa~~~