Smith |
Holy smoke...! This is AMAZING...! (Moderator: BAH_Strike) | Previous Topic | Next Topic |
Page 1 of 2 | Goto page 1, 2 Next |
Quote: |
...patch 1 line in a .JKL file |
loading: jkl = jklGetFileName(); if( compareString(jkl, "03katarn.jkl") ) { line = jklFindLine("249: battery battery 1.657500 -0.226070 -0.102091 0.000000 0.000000 0.000000 163 "); jklRemoveLine(line); jklInsertLine(line, "249: crate02 crate02 1.657500 -0.226070 -0.102091 0.000000 0.000000 0.000000 163 " } |
Quote: |
...some kind of simple API like... |
Quote: |
As far as ideas, if you have any way of getting a hold of Libsa Norec --> That dude has some wicked ideas for some COG verbs that would be AMAZING if implemented. |
case "getcurrentcameraposition":
{ if (Game.WorldRenderer == null || Game.WorldRenderer.Camera == null) return Flex.From(Vec3.Zero); return Flex.From(Game.WorldRenderer.Camera.Position); } |
case "findsectoratpos":
case "getsectoratpos": { if (args == null || args.Length != 1) { Log.Warning(syscall + " called with wrong arg count"); return Flex.False; } Vec3 pt = args[0].AsVec3; return Flex.From(Game.Level.GetSectorByPoint(pt)); } |
case "getthingbysignature":
{ if (args == null || args.Length != 1) { Log.Warning(syscall + " called with wrong arg count"); return Flex.False; } int findID = args[0].AsInt; foreach (Thing thing in Game.Level.Things) if (thing.UniqueID == findID) return Flex.From(thing); return Flex.From(-1); } |
Quote: |
* int cog = GetThingLevelCog(int thing, int ID);
* int cog = GetSectorLevelCog(int sector, int ID); * int cog = GetSurfaceLevelCog(int surface, int ID); Returns the [ID+1]th cog that references that thing/sector/surface in the current level's JKL. Returns -1 if [ID+1] exceeds the amount of times that thing is referenced in the current level's Cogs. This could be used, for example, to "activate" or "damage" a surface without actually activating/damaging it by sending messages to all that thing/sector/surface level cogs. Alternately... * int dummy = SendMessageToThing(int thing, message, param0, param1, param2, param3); * int dummy = SendMessageToSector(int sector, message, param0, param1, param2, param3); * int dummy = SendMessageToSurface(int surface, message, param0, param1, param2, param3); Same as SendMessageEx(), but would send the message to all cogs that reference that thing/sector/surface. A value could be returned via ReturnEx(). |
Page 1 of 2 | Goto page 1, 2 Next |
Holy smoke...! This is AMAZING...! (Moderator: BAH_Strike) | Previous Topic | Next Topic |