pro5 Posted December 31, 2006 Share Posted December 31, 2006 Does BG1 engine support using LOCALS-type variables in creature scripts? I don't see any examples of such use in BG1 scripts, it's GLOBAL everywhere, even in places where LOCALS would be logical. Link to comment
devSin Posted December 31, 2006 Share Posted December 31, 2006 I think it does support area variables (although never used or only used once or twice), but I can't remember if it actually supports LOCALS. I doubt it, but you could either test it or look at the canonical effects list to see if the variable effect exists in BG or Tales. Link to comment
CoM_Solaufein Posted December 31, 2006 Share Posted December 31, 2006 LOCALS wasn't used until Icewind Dale came out. IN BG1 you will have to use GLOBAL. Link to comment
Avenger Posted January 1, 2007 Share Posted January 1, 2007 LOCALS wasn't used until Icewind Dale came out. IN BG1 you will have to use GLOBAL. My BG1 version contains LOCALS strings, therefore, i conclude, it allows LOCALS. It is the tales of the sword coast version, of course This might be only area locals, if creatures would have locals, they would need the 0xbb effect as DevSin said. Or these locals wouldn't be saved. Area variables are used. Link to comment
CoM_Solaufein Posted January 1, 2007 Share Posted January 1, 2007 Since when? I have Tales installed. I just used NI to do a search in script and dialogue files and it comes up with nothing. That is if we are discussing something like this: Global("Statement","LOCALS",1). Link to comment
Echon Posted January 1, 2007 Share Posted January 1, 2007 LOCALS variables work fine. Try adding the following two blocks to DPLAYER3.BCS if you want to see them in action: (but like Avenger said, and as far as I remember, they are not saved) IF Global("Kill","LOCALS",0) THEN RESPONSE #100 SetGlobal("Kill","LOCALS",1) END IF Global("Kill","LOCALS",1) THEN RESPONSE #100 Kill(Player1) END -Echon Link to comment
cmorgan Posted January 1, 2007 Share Posted January 1, 2007 side question - what would non-saved locals be useful for? Link to comment
berelinde Posted January 1, 2007 Share Posted January 1, 2007 Within the same script? I'm using them as part of combat script. It doesn't ever need to become part of a saved game. Link to comment
cmorgan Posted January 1, 2007 Share Posted January 1, 2007 hmmm... so LOCALS in BG1 are really aimed at scripting, while in BG2 they can be used as a localized version of GLOBAL. I know that a dialogue cannot use GLOBAL within itself (it sets it afterwards), but do LOCALS get set immediately so they can be useful, or is that only for scripting while the script is running? Link to comment
Avenger Posted January 2, 2007 Share Posted January 2, 2007 cmorgan: i don't think locals and globals would work differently in this aspect. And heh! I didn't expect locals really work (even if not saved), it was just a guess, hehe. You can use not saving locals for a lot of scripting stuff. It is really good if they don't encumber the save file. Probably i will need not saved locals in gemrb too (as an additional feature over saving locals). Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.