Larian Banner
Previous Thread
Next Thread
Print Thread
Joined: Nov 2017
E
Erikem Offline OP
journeyman
OP Offline
journeyman
E
Joined: Nov 2017
Hi,

In story code we can do looping through DB_ by calling them in our checks.

Quite often we want something to happen with each DB_ entry that matches our rule but in certain cases there's a need to stop the look-up through DB_ after the first match

Many development languages have a "break;" command, which allows us to exit from the loop if needed without finishing it.

Can we please have such a command available in Story as well?

Joined: Mar 2016
T
addict
Offline
addict
T
Joined: Mar 2016
Have a look at https://docs.larian.game/Osiris_Design_Patterns#Breaking_off_a_Loop to see how you can easily break off a loop. It is slightly more typing work than a plain "break;", but not that much.


Moderated by  Larian_Koala, Larian_KVN 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5