- Dec 6, 2017
- 14
- 4
I am working on my first game and i encountered the following problem.
I wanted to set a scene up where random "events" are displayed.
Here is my code:
<<set _random to random(1, 50)>>
<<if _random < 41>>
<img src="IMG\Forest.png" width="800">
You are in the Forest
<</if>>
<<if _random == 41>>
<img align="top" src="IMG\Forest\1.png" width="800">
You are not sure what you saw, but you definitly saw <b>something</b>
<</if>>
<<if _random == 42>>
<img src="IMG\Forest\2.png" width="800">
You are not sure what you saw, but you definitely saw <b>something</b>
<</if>>
<<if _random == 43>>
<img src="IMG\Forest\3.png" width="800">
You are not sure what you saw, but you definitely saw <b>something</b>
<</if>>
<<if _random == 44>>
<img src="IMG\Forest\4.png" width="800">
You are not sure what you saw, but you definitely saw <b>something</b>
<</if>>
<<if _random == 45>>
<img src="IMG\Forest\5.png" width="800">
You are not sure what you saw, but you definitely saw <b>something</b>
<</if>>
<<if _random == 46>>
<img src="IMG\Forest\6.png" width="800">
You are not sure what you saw, but you definitely saw <b>something</b>
<</if>>
<<if _random == 47>>
<img src="IMG\Forest\7.png" width="800">
You are not sure what you saw, but you definitely saw <b>something</b>
<</if>>
<<if _random == 48>>
<img src="IMG\Forest\8.png" width="800">
You are not sure what you saw, but you definitely saw <b>something</b>
<</if>>
<<if _random == 49>>
<img src="IMG\Forest\9.png" width="800">
You are not sure what you saw, but you definitely saw <b>something</b>
<</if>>
<<if _random == 50>>
<img src="IMG\Forest\10.png" width="800">
You are not sure what you saw, but you definitely saw <b>something</b>
<</if>>
[[Town]]
[[Park]]
[[Witch's Hut]]
The problem is that the images and links are not aligned with the top.
I understand why this happens, but how can i solve this and align everything correctly?
I wanted to set a scene up where random "events" are displayed.
Here is my code:
<<set _random to random(1, 50)>>
<<if _random < 41>>
<img src="IMG\Forest.png" width="800">
You are in the Forest
<</if>>
<<if _random == 41>>
<img align="top" src="IMG\Forest\1.png" width="800">
You are not sure what you saw, but you definitly saw <b>something</b>
<</if>>
<<if _random == 42>>
<img src="IMG\Forest\2.png" width="800">
You are not sure what you saw, but you definitely saw <b>something</b>
<</if>>
<<if _random == 43>>
<img src="IMG\Forest\3.png" width="800">
You are not sure what you saw, but you definitely saw <b>something</b>
<</if>>
<<if _random == 44>>
<img src="IMG\Forest\4.png" width="800">
You are not sure what you saw, but you definitely saw <b>something</b>
<</if>>
<<if _random == 45>>
<img src="IMG\Forest\5.png" width="800">
You are not sure what you saw, but you definitely saw <b>something</b>
<</if>>
<<if _random == 46>>
<img src="IMG\Forest\6.png" width="800">
You are not sure what you saw, but you definitely saw <b>something</b>
<</if>>
<<if _random == 47>>
<img src="IMG\Forest\7.png" width="800">
You are not sure what you saw, but you definitely saw <b>something</b>
<</if>>
<<if _random == 48>>
<img src="IMG\Forest\8.png" width="800">
You are not sure what you saw, but you definitely saw <b>something</b>
<</if>>
<<if _random == 49>>
<img src="IMG\Forest\9.png" width="800">
You are not sure what you saw, but you definitely saw <b>something</b>
<</if>>
<<if _random == 50>>
<img src="IMG\Forest\10.png" width="800">
You are not sure what you saw, but you definitely saw <b>something</b>
<</if>>
[[Town]]
[[Park]]
[[Witch's Hut]]
The problem is that the images and links are not aligned with the top.
I understand why this happens, but how can i solve this and align everything correctly?