it's not that difficult...TadeuszD wrote:and next merging it using another tools...
anyway, you could try this: (untested)
[Edit: possibly cleaner version]
Moderator: Graphics Moderators
it's not that difficult...TadeuszD wrote:and next merging it using another tools...
Yes, you can. But if you want to calculate bitmask_consist_info for whole train you should use PARENT scope in switch definition. See the example:TadeuszD wrote:Can I use bitmask_consist_info to determine wagon's parameter?
Code: Select all
switch(FEAT_TRAINS, PARENT, switch_wagon_speed, hasbit(bitmask_consist_info, VINFO_EXT_PASSENGER_WAGON) ) {
1: return 160;
return 125;
}
Code: Select all
←[33m nmlc warning: "src\\constr-stages.pnml", line 101: Block 'switch_constr_anim_speed' is not referenced, ignoring.←[0m
Code: Select all
building_flags: bitmask(HOUSE_FLAG_ANIMATE, HOUSE_FLAG_RANDOM_ANIMATION);
Code: Select all
switch(FEAT_HOUSES, SELF, switch_anim_next_frame, STORE_TEMP(4, 1)) {
return LOAD_TEMP(1);
}
Code: Select all
switch(FEAT_HOUSES, SELF, switch_anim_next_frame, STORE_TEMP(extra_callback_info1, 1)) {
return LOAD_TEMP(1);
}
Code: Select all
from colorama import init
init()
Code: Select all
switch(1) {
return 2;
}
Code: Select all
switch(1) {
0: return 2;
return 2;
}
unlikelyTadeuszD wrote: Does this problem corresponds to http://dev.openttdcoop.org/issues/5294 ?
Thanks. Good to know...Eddi wrote:be aware that due to an oddity in nfo, switches with only a "return" without any other decision targets are a special case, which returns the last accessed variable instead of whatever comes after "return".
Code: Select all
property {
building_flags: bitmask(HOUSE_FLAG_ANIMATE, HOUSE_FLAG_RANDOM_ANIMATION);
refresh_multiplier: 0;
...
}
switch(FEAT_HOUSES, SELF, switch_anim_next_frame, extra_callback_info1 & 0x03 != 0) {
1: return 0;
return 1;
}
Code: Select all
switch(FEAT_TRAINS, SELF, sound_169 , extra_callback_info1) {
SOUND_EVENT_START: return sound("snds/start.wav");
SOUND_EVENT_TUNNEL: return sound("snds/houkacka.wav");
return CB_RESULT_NO_SOUND;
}
.
.
.
graphics {
.....
sound_effect: sound_169;
}
There is support for virtually every letter. Required encoding for all text files is UTF-8, you likely use something else; check with your editor settings.Trond wrote:So, there is no support for norwegian letters with NML? I get an error when trying to encode with a languagefile containing the norwegian letter 'å'... When I remove the 'å', it encodes fine...
Users browsing this forum: No registered users and 23 guests