therfiles Posted February 3, 2014 Share Posted February 3, 2014 Hey again. This is probably more for the coders or @@mrwonko or maybe @@MoonDog. I'm just curious, what operators can we use in ICARUS? For example. when using the SET command on your own variables (a float) you can just simply set your float variable to "+1" and it adds 1 to the current value. I was just wondering, is there anything like that that you've encountered that does that for strings? For example, you have a string named Str1, set to "npc spawn jedi" and you set a string named Str2 to "; npc spawn reborn", could you then set Str1 to get(STRING, "Str1" + "Str2")? Basically I'd really like to be able to merge the two strings and redefine Str1. Is there any operator or symbol that can "merge" strings like that? I've already tried a couple things. That way, I can use ui_prisonerobj_maxtotal (a ICARUS AND ingame cvar) to multiple commands, as needed by the multiple scripts, and just vstr them all at once, rather than defining several other variables and such. Thanks guys! Link to comment
eezstreet Posted February 4, 2014 Share Posted February 4, 2014 Which SET_ type are you referring to? Link to comment
eezstreet Posted February 4, 2014 Share Posted February 4, 2014 Just checking the code here (Q3_Interface.cpp), the FLOAT type is the only one that has the incrementer built into it. But! The blocks are sent through via direct string means, ergo, the game processes the contents of the set command as a string, so it reads "+1" as a string and chops off the + or - depending. This is specific to floats only. However, it wouldn't be so so difficult for someone to write a formatter or something into this code. therfiles likes this Link to comment
therfiles Posted February 4, 2014 Author Share Posted February 4, 2014 Aww. That stinks. Thanks for looking into it, @@eezstreet. Really interesting findings, though. I'll be sure to look into that whenever I work with floats. I'd love some code changes, but this is for NpcSP, so I'm trying to keep everything compatible with any SP mod imaginable. Link to comment
MoonDog Posted February 4, 2014 Share Posted February 4, 2014 If only this weren't JKA and you weren't constrained to Icarus. CODScript or even the scripting in DOOM 3 would make this so stupid simple to do. Eez. While you are looking at Icarus, is there a specific reason why set_scale works with NPC_* spawners in MP but not SP? therfiles likes this Link to comment
therfiles Posted February 4, 2014 Author Share Posted February 4, 2014 @@MoonDog: Yeah. I love ICARUS at times, but its limitations can be frusterating! Also...I didn't know set_scale didn't work in SP...that was going to be a feature in NpcSP, and players could control the size of the npcs, etc. Woulda been fun. Shucks. Link to comment
eezstreet Posted February 4, 2014 Share Posted February 4, 2014 If only this weren't JKA and you weren't constrained to Icarus. CODScript or even the scripting in DOOM 3 would make this so stupid simple to do. Eez. While you are looking at Icarus, is there a specific reason why set_scale works with NPC_* spawners in MP but not SP?When targeting the spawner itself, or the NPC generated? Link to comment
therfiles Posted February 4, 2014 Author Share Posted February 4, 2014 I just tested it, and I couldn't get it to work on the player or any NPC I spawned. Link to comment
MoonDog Posted February 4, 2014 Share Posted February 4, 2014 When targeting the spawner itself, or the NPC generated? I only tried a spawnscript. I hadn't tried using a trigger, relay, script_runner and a spawner yet, but I probably should. Some one inquired about getting set_scale to work on an NPC and via spawnscript I could only get it to function on the NPC's model in MP. Link to comment
therfiles Posted February 4, 2014 Author Share Posted February 4, 2014 I only tried a spawnscript. I hadn't tried using a trigger, relay, script_runner and a spawner yet, but I probably should. Some one inquired about getting set_scale to work on an NPC and via spawnscript I could only get it to function on the NPC's model in MP. Yeah. I couldn't even get it to work when used on the player... Link to comment
MoonDog Posted February 4, 2014 Share Posted February 4, 2014 Well... I know my way around the source code about as well as Ory'Hara knows his way around a woman's baby cannon. So I shan't provide any valuable answers. Omicron and Tempust85 like this Link to comment
eezstreet Posted February 4, 2014 Share Posted February 4, 2014 They set ent->s.scale, which isn't the variable used by NPCs and player scale. I couldn't actually find the MP code that handles this, so I can't immediately compare atm. Link to comment
NumberWan Posted February 27, 2014 Share Posted February 27, 2014 Too bad SET_SCALE won't work with SP in JA. It would help making some decent stuff for mods and especially cutscenes (e.g. a hologram of a character). Thus the scale of an NPC in mod can only be set in NPC files... I remember seeing scalex, scaley, scalez, so I tried to learn some things there. To no avail. Also, I thought, the command for SP had (perhaps) some different name, like SET_SCALES or SET_MODELSCALE instead of just SET_SCALE. I also tried to see if some shaders could resolve this issue, I mean, that if the shaders can make an object move, then perhaps it could make a model larger or smaller... No result here yet. I do know how to make a little hologram otherwise, but it won't be the answer to the question how to scale an NPC in SP. therfiles likes this Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now