Description
There are many ways of loading a model; the following ways are the best ways:
This one is very quick and used most often:
- Code:
0247: load_model #INFERNUS
:Label_0
0001: wait 0 ms
00d6: if
0248: model #INFERNUS available
004d: jump_if_false @Label_0
The way which is mostly used in mission scripts:
- Code:
0247: load_model #INFERNUS
:Label_0
00d6: if
8248: not model #INFERNUS available
004d: jump_if_false @Label_1
0001: wait 0 ms
0002: jump @Label_0
:Label_1
//..............................
This way is most used in probably a external script:
- Code:
:Label_0
00D6: if
8248: not model #INFERNUS available
004D: jump_if_false @Label_1
0247: load_model #INFERNUS
0001: wait 0 ms
0002: jump @Label_0
:Label_1
//..............................
We are now using high level construction:
While..end
- Code:
0247: load_model #INFERNUS
while 8248: not model #INFERNUS available
0001: wait 0 ms
end
Break
- Code:
0247: load_model #INFERNUS
while true
00D6: if
0248: model #INFERNUS available
then
Break
end
0001: wait 0 ms
end
Repeat..until
- Code:
0001: wait 0 ms
0247: load_model #INFERNUS
repeat
0001: wait 0 ms
until 0248: model #INFERNUS available
If you're only loading one model for example the conditional opcode "if" can be omitted from the script:
- Code:
0247: load_model #INFERNUS
:Label_0
0001: wait 0 ms
0248: model #INFERNUS available
004d: jump_if_false @Label_0
0 - 1 condition 1..8 - 2 and more conditions (9 max) connected by logic operator AND.
If you're loading one then 9 models then, just restart it like this, for example:
- Code:
:Label_0
0001: wait 0 ms
00d6: if and
0248: model <model> available
0248: model <model> available
0248: model <model> available
0248: model <model> available
0248: model <model> available
0248: model <model> available
0248: model <model> available
0248: model <model> available
0248: model <model> available
004d: jump_if_false @Label_0
// it's reached it's limit so for the remaining models, restart it:
00d6: if and
0248: model <model> available
0248: model <model> available
0248: model <model> available
004d: jump_if_false @Label_0