Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Things that has to be fixed:
- taken from a forum topic: "Cleaning up documentation for Lua scripting"
- 1. matrix SetMatrix (A,B,C,
- D,E,F,
- G,H,I,
- J,K,M)
- does not produce the correct matrix
- this is what it returns:
- [D E F]
- [A B C]
- [G H I]
- [J K M]
- 2.
- number, vector GetTerrainHeightAndNormal(handle h)
- number, vector GetFloorHeightAndNormal(handle h)
- They do not work with handle
- current method to get it to work is:
- number, vector GetTerrainHeightAndNormal(GetPosition(h))
- number, vector GetFloorHeightAndNormal(GetPosition(h))
- 3.
- string.gsub does not work correctly:
- "When using GetOdf(handle) it will return a string with the length of 8,
- but most odf names are only 6 characters in length.
- So what I think is happening is that when a C string
- is converted to a lua string the null characters aren't cut off.
- There is no good way of fixing this issue other than using substring.
- I tried to use string.gsub, but it doesn't like the null character."
- Example:
- myStr = "Test\0\0";
- myStr = myStr:gsub("\0","");
- print(myStr,myStr:len()); --This outputs: "Test 6"
- --So the null characters where not removed
- --2nd test
- myStr = "Test\0\0";
- myStr = myStr:gsub("\0","1");
- print(myStr,myStr:len()); --This outputs: "T1e1s1t1 8"
- Only way to fix:
- myStr = "Test\0\0";
- myStr = myStr:sub(1,4);
- 4.
- bool GetAIControl(team);
- Not implemented, returns nil;
- Requsts:
- mostly taken from forum topic: "1.5.3 Lua Requests"
- url: http://www.battlezone1.org/1-5-3-lua-requests-t3934.html
- Note: didn't add every request to the list
- only added the requests that are currently
- imposible to do in lua and that isn't infeasible to implement.
- 1.
- A way to set the position of a given path:
- SetPosition(string path [,integer point])
- 2.
- A way to write add a "dynamic" objective:
- integer AddObjective(string text,bool fromFile);
- where the integer returned is some sort of objective id
- that can be usied with RemoveObjective(integer objectiveId);
- I.E:
- AddObjective("Number of rounds:" .. roundNumber,false);
- 3.
- A way to control the music track being played:
- AudioMusic(num track);
- 4.
- A way to choose color that DisplayMessage will use:
- DisplayMessage(string message, string color)
- I.E:
- DisplayMessage("Hello","RED"/"GREEN"/"BLUE");
- or
- DisplayMessage(string message, integer color);
- I.E:
- local color = bit.lshift(red,8*2);
- color = bit.bor(color,bit.lshift(green,8));
- color = bit.bor(color,blue);
- DisplayMessage("Hello",color);
- 5.
- Some for of IO(file, sockets) access, to make dynamic missions possible.
- 6.
- Create and remove paths
- CreatePath("name",vector position);
- RemovePath("name");
- 6.
- Modify terrain in real time
- height, texture, etc
- 7.
- A way to toggle the powerstate of an object(kinda infeasible)
- togglePower(handle h,bool power)
- 8.
- Extend GameKey so that it is possible to detect
- whether the key is beeing pressed/typed or released.
- GameKey(string key, bool mode);
- 9.
- A way to get all paths on the map:
- iterator getAllPaths();
- Other requests:
- Requests made by people that is possible to
- do with the current lua api:
- *bool IsPowered(handle h);
- *"Raycasting line of sight and firing solution checks"
- *"Radar ping revealing an area to the AI"
- *"Checking the pathing viability of a straight line vector a->b"
- *"Building foundation check"
- *"Slab map access if viable"
Advertisement
Add Comment
Please, Sign In to add comment