How to make this time ticker work?
Posted: Thu Oct 22, 2015 1:59 pm
Hello Fellow modders,
I am trying to make this next script run. the numbers 9,10,11 - should open wallgratings simutaniously at the same tick, but I am getting the code wrong I geuss. how do I combine them into one tick?
obviously placing the numbers in brackets does not work... i've also tried {"9,10,11"}, and only "9,10,11",
function dmgrat9tick()
local seq = {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,{9,10,11},}
findEntity("dungeon_wall_grating_"..seq[step]).door:open()
step = step%#seq+1
end
I am trying to make this next script run. the numbers 9,10,11 - should open wallgratings simutaniously at the same tick, but I am getting the code wrong I geuss. how do I combine them into one tick?
obviously placing the numbers in brackets does not work... i've also tried {"9,10,11"}, and only "9,10,11",
function dmgrat9tick()
local seq = {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,{9,10,11},}
findEntity("dungeon_wall_grating_"..seq[step]).door:open()
step = step%#seq+1
end