Posted by: Jay Doomed
« on: September 25, 2017, 12:20:41 PM »Good work Smoke nice to see more helpful info keep it up.
Posted by: Jay Doomed« on: September 25, 2017, 12:20:41 PM »Good work Smoke nice to see more helpful info keep it up.
Posted by: BehemothProgrammer« on: September 25, 2017, 02:44:19 AM »Oh wow that sucks. I'm going to have to see if it's the same in T2 since it's pretty much the same.
Posted by: Smoke39« on: September 25, 2017, 01:28:09 AM »Wasted a bunch of time today trying to figure out what was wrong with my math, only to eventually figure out that the "kVec3 *= kQuat" operator is broken, so I added a big ol' warning to the kQuat page.
Posted by: Smoke39« on: September 24, 2017, 02:46:01 AM »Posted by: Smoke39« on: September 11, 2017, 07:21:05 PM »Added info on actor initialization to ScriptObject, and info on the persistent bit (mostly in ScriptObject, plus some functions in kActor).
Posted by: Smoke39« on: June 23, 2017, 07:24:18 PM »Finally added an explanation of native classes (kex-prefixed), and how they work with internal script classes (k-prefixed) and user scripts (the stuff we can change): https://smoke39.github.io/turok/scripts.html#ControlStructure. It can be kinda confusing, so I hope I was able to make things a little clearer, rather than even more confusing.
Sometime I'd like to put together a proper reference on actor defs, with info on all the native classes. Currently you can kinda get a feel for what's delegated to the scripts by looking at the callbacks in ScriptObject, ScriptObjectPlayer, and ScriptObjectWeapon, but I think it'll help people develop an intuition seeing examples of the other side of that -- what's handled natively. Posted by: raul« on: May 17, 2017, 11:13:46 PM »Thank you so much Smoke39, this guide is pretty handy!
Posted by: Gazer« on: February 14, 2017, 04:23:33 PM »I figured out the problem, 2 bad models - out of 16 total that I added. Sheesh I'm relieved it's not a bad fix. I say mapping for this thing is a real chore. I guess I'm spoiled from using Radiant in the past. There was a lot of people working on the same thing who generated a lot of solutions to problems. It's astonishing the scripting work you've done Smoke.
Thanks - Gazer Posted by: Smoke39« on: February 14, 2017, 01:57:31 PM »Smoke do you have anything on the hexadecimal codes? No. I think that stuff's probably not of any use without a debugger and the game's source. Posted by: Gazer« on: February 14, 2017, 01:33:26 PM »My best guess at this point is the models that I copied and retextured. I'm cognizant of the case sensitivity and I checked everything in that respect. So in testing my models now in controlled conditions I'm getting 'memory could not be read' crash log return. (with developer '0')
Eh - the little done, the vast undone. Gazer EDIT: Smoke do you have anything on the hexadecimal codes? Posted by: Smoke39« on: February 14, 2017, 01:27:50 AM »My first guess would be inconsistent capitalization somewhere. As I highlight here, unpackaged file names are not case-sensitive, but files packaged in a kpf are case-sensitive. E.g., having a file named "Banana.map" referred to as "banana.map" in mapInfo.txt will cause problems.
Posted by: Gazer« on: February 14, 2017, 01:14:44 AM »Hey Smoke, Howzit?
Hey I posted my level without custom scripting (besides adding my mapid to the mapInfo.txt), but my level doesn't run without the developer "1" flag. Have you run across any information on what would cause that? I do have models in the game that are hakked and retextured, and then re-deposited into the game. That would be the only thing that could cause a conflict with original files. I haven't noticed any conflict though and no error messages besides game crashes at startup when developer set to "0". Sobek.exe caused and exception - yata yata - hexadecimal code - hexa - hexa Thanks - Gazer Posted by: Gazer« on: February 10, 2017, 06:39:43 PM »I've noticed your work Smoke! you Rock! I can't do what you do ... ha ha no way no how. My mind gets all kerplunktuated (void) Kstr #sizzledik -% 420 Lsd @boozer
Thanks - Gazer I just looked at your examples - I am shocked. You did a lot of work Smoke. If I dig into this I will never finish a single map. I generally have to check each character that I type 3 times for syntax. And I flip letters and numbers sometimes, when I tpye. lol (this php has autocorrect damn i7 chip) So I'm dumbfounded. Gazer Posted by: Smoke39« on: February 10, 2017, 02:43:23 PM »Near the top of main.txt, after all the #includes, you'll see:
funcdef void VARFUNC(const kStr &in, const kStr &in); This is defining a function type, named "VARFUNC," which takes two strings as parameters, and has no return type. This allows us to pass functions of this type as a parameter to other functions. In this case, Add() and SetValue(), in VarFunctor. Add() is used to add new variables to GameVariables, and SetValue() is used to change the value of variables already in GameVariables. In main(), you'll see: SetStateVars(VARFUNC(functor.Add)); This is calling SetStateVars(), passing the Add() function as a parameter. This is called once when the game is run, and it registers all the persistent, per-save variables. In newgame(), you'll see: SetStateVars(VARFUNC(functor.SetValue)); This is also calling SetStateVars(), but this time passing the SetValue() function as a parameters. This is called every time the player starts a new game, and it resets all the persistent game variables to their default values. The purpose of all this function passing malarky is that we can specify all the persistent game variables ONCE in SetStateVars(), rather than having to have two copies for adding and setting. THE BOTTOM LINE is, to add your own persistent, per-save variables, just add them to either SetStateVars(), or InitCustomStateVars() (or even in a new function, and call it from SetStateVars(), however you wanna organize it). Just use: setFunc( "var name", "initial value" ); and it'll ADD or UPDATE your new variables, whichever is appropriate. You can see examples of this in Turok+, where I've added a bunch of my own variables at the end of InitCustomStateVars(). Posted by: Gazer« on: February 10, 2017, 05:26:43 AM »lol at Dinomite - you should just learn a simple modeling proggie. You could be the resident modelersaurus.
Hey Smoke, how about you help me with a couple of scripts? I am bad at understanding the structure of them in general. Then when I do 'get it' I will forget again in like 30 seconds afterward. In the 'scripts' folder in the 'main.txt' file there's an area for 'once-only' - 'GameVariables' and other simple scripts that reference main scripts in the engine. I'd like to utilize this in my mapfile but I can't understand the reference to (VARFUNC(functor.Add)); I tried checking the Angelscript forums but I don't have the time to learn it from scratch. As I noted earlier, I'm bad with basic programming syntax in general anyway. So do you understand 'InitCustomStateVars' and 'SetStateVars' and how to add them to 'main.txt'? I just want to add particularly 1 item to my level. Thanks, Gazer |