Loop question/problem
#4

I'll give you an example to get the idea.

Normally if you were to show the teleport locations of the category 2 you would loop through all the teleports, check if the category is equal to 2 and "join" the name of the location to the string to show the dialog.

Player chooses the listitem 3 from the list so using Teleport[listitem] would be wrong because the categories are mixed up.

On dialog response now, you have the listitem so you loop through the teleports again and if the category is 2, we increase the variable until its value is equal to the listitem so you get the index (3rd item of category 2) to use in Teleport array.
Reply


Messages In This Thread
Loop question/problem - by ShoortyFl - 11.07.2016, 22:02
Re: Loop question/problem - by Konstantinos - 11.07.2016, 22:10
Re: Loop question/problem - by ShoortyFl - 11.07.2016, 22:13
Re: Loop question/problem - by Konstantinos - 11.07.2016, 22:22
Re: Loop question/problem - by ShoortyFl - 11.07.2016, 22:29
Re: Loop question/problem - by ShoortyFl - 11.07.2016, 23:07
Re: Loop question/problem - by ShoortyFl - 12.07.2016, 09:16
Re: Loop question/problem - by Konstantinos - 12.07.2016, 10:04
Re: Loop question/problem - by ShoortyFl - 12.07.2016, 10:14
Re: Loop question/problem - by Konstantinos - 12.07.2016, 10:18

Forum Jump:


Users browsing this thread: 1 Guest(s)