Commit
fixed entity model configuration loading; renamed script function getEntityProperties(...) to getEntityModelProperties(...);
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
-- OPENTOMB LEVEL SCRIPT | ||
-- FOR TOMB RAIDER 3, SHORE.TR2 | ||
|
||
dofile("scripts/staticmesh/staticmesh_script.lua"); | ||
print("Level script loaded (SHORE.lua)"); | ||
|
||
static_tbl[30] = {coll = COLL_BBOX_BASE}; -- | ||
|
||
print("Level script loaded (SHORE.lua)"); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
playStream(110) | ||
playStream(110) | ||
|
||
This comment has been minimized.
Sorry, something went wrong. |
||
setEntityCollision(88, 0); -- model 457 |
6 comments
on commit ebcccb3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The line "setEntityCollision(88, 0);" works if You load level by setgamef(4, 9) (works in my case); load saved game will rewrite collision config because game saves keep collision flags of the entities; If You mean "playStream(110)" - I have no idea, soundtrack works for me, if I use setgamef(4, 9);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, that's strange... I'm doing the same setgamef(4,9)
and can't get past the arch. Only when I do setEntityCollision(88,0)
it works for me. There should be some rational explanation to the different results. Somebody else should try it too.
Another possibility is a difference in compiler or OS, which will be difficult to trace.
EDIT: I found the reason: it's the case sensitivity of file names. In TR4.lua level name is lower case and in case sensitive file system it should be too. But the script name in level/tr4 is LAKE_autoexec.lua
(note the upper case here). That's why it doesn't work on Linux.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try to add "print("LAKE_autoexec.lua loaded");" to scripts/level/tr4/LAKE_autoexec.lua and try to find "LAKE_autoexec.lua loaded" in console... or use build-clean (it helps in some cases, but I am not sure about this case)...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works if I rename it to a lower case. Also, I have cannot open scripts/level/tr4/lake.lua: No such file or directory
in lua_out.txt. I'll better open a separate issue in this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only one idea: I have lake.tr4 level file name, but script file name is LAKE.lua... windows is no case sensitive (LAKE.tr4 == lake.tr4 a.t.c.). to resolve it I need to rewrite function, that generates script name and use only upper or only lower case symbols in file name (and do not touch the path) + rename all level scripts to upper or lower symbols.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what I thought too.
The next line doesn't work from here for some reason. But it works if applied manually afterwards.