Jump to content


Photo

Question to loop fix in AR0700.bcs


8 replies to this topic

#1 jastey

jastey
  • Gibberlings
  • 6696 posts
  • Gender:Female

Posted 16 February 2017 - 02:00 AM

I see this in the v10 tp2:
 

// Waukeen's Promenade script loop fix (Nythrun)
COPY_EXISTING ar0700.bcs override
  DECOMPILE_BCS_TO_BAF 
    REPLACE_TEXTUALLY
    ~^\(  GlobalTimerExpired("Bystander","GLOBAL")\)~
    ~\1 OR(2) InMyArea("bystand1") InMyArea("bystand2")~
  COMPILE_BAF_TO_BCS
  BUT_ONLY

I am confused: I thought 'InMyArea()' wouldn't work / make sense in an area script?



#2 Roxanne

Roxanne
  • Modders
  • 1245 posts
  • Gender:Not Telling

Posted 16 February 2017 - 02:16 AM

-


Edited by Roxanne, 16 February 2017 - 02:23 AM.

The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*


#3 jastey

jastey
  • Gibberlings
  • 6696 posts
  • Gender:Female

Posted 16 February 2017 - 02:48 AM

Roxanne: May I aks why you delete the content of your post completely? Did you post something you now think would be wrong and you don't bother letting us in to your (second) thoughts or is there another reason I am not aware of?



#4 Roxanne

Roxanne
  • Modders
  • 1245 posts
  • Gender:Not Telling

Posted 16 February 2017 - 04:16 AM

Roxanne: May I aks why you delete the content of your post completely? Did you post something you now think would be wrong and you don't bother letting us in to your (second) thoughts or is there another reason I am not aware of?

It was an error, I did not check the headline that this topic is for BG2 not BG2EE/EET, sorry.

 

I checked my ToB save (from EET) and saw the bystanders are removed at some time. I would use InActiveArea in an area script, but I think this is because of different intention, i.e. expecting things to happen as soon as possible, while removing bystanders is not a time critical thing.


Edited by Roxanne, 16 February 2017 - 04:16 AM.

The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*


#5 jastey

jastey
  • Gibberlings
  • 6696 posts
  • Gender:Female

Posted 16 February 2017 - 04:43 AM

InActiveArea() would also work, as the Player1 has to be in AR0700, too (no way for NPCs to enter the area without the protagonist, although I am not sure what yould happen if player1 is inside a building). I am still confused about the use of InMyArea() in an area script, though.



#6 Roxanne

Roxanne
  • Modders
  • 1245 posts
  • Gender:Not Telling

Posted 16 February 2017 - 08:00 AM

InActiveArea() would also work, as the Player1 has to be in AR0700, too (no way for NPCs to enter the area without the protagonist, although I am not sure what yould happen if player1 is inside a building). I am still confused about the use of InMyArea() in an area script, though.

Sorry, InActiveArea() does  not work here - it causes a CtD. It only works if the creature that is referenced is made a Global.

 

This one works in the given case:

 

0x400D Exists(O:Object*)
Returns true only if the specified object exists in the current area (note that dead creatures can still be counted as existing).

 

IF
    GlobalTimerExpired("Bystander","GLOBAL")
    OR(2)
        Exists("bystand1")
        InMyArea("bystand2")
THEN
    RESPONSE #100
        ActionOverride("bystand1",EscapeArea())
        ActionOverride("bystand2",EscapeArea())
END


Edited by Roxanne, 16 February 2017 - 08:05 AM.

The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*


#7 jastey

jastey
  • Gibberlings
  • 6696 posts
  • Gender:Female

Posted 16 February 2017 - 08:49 AM

Yes, Exists() is what I would expect here. Hopefully someone who feels responsible for the Fixpack takes a look at this and changes it / maybe even still knows how it came to be (because I really think InMyArea() doesn't work here).

 

With InActiveArea() I have no experience. Is it in some way better than Exists()?



#8 Roxanne

Roxanne
  • Modders
  • 1245 posts
  • Gender:Not Telling

Posted 16 February 2017 - 09:27 AM

Yes, Exists() is what I would expect here. Hopefully someone who feels responsible for the Fixpack takes a look at this and changes it / maybe even still knows how it came to be (because I really think InMyArea() doesn't work here).

 

It is how it is coded in BG2EE and it works there - so probably copied from there into fixpack.

 

 

With InActiveArea() I have no experience. Is it in some way better than Exists()?

It only works for creatures that are made Global (and a CtD is hard punishment for using it wrong). However, if used correctly it e.g. spawns a missing NPC with Global instantaneously, like e.g. a companion type creature

Spoiler


Edited by Roxanne, 16 February 2017 - 09:27 AM.

The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*


#9 CamDawg

CamDawg

    Seven billion ton robot monster

  • Gibberling Poobah
  • 9095 posts
  • Gender:Not Telling

Posted 04 June 2017 - 05:21 AM

Changed to Exists triggers for v11 Beta 1.


I came here with a simple dream: a dream of killing all humans. And this is how it must end? Who's the real seven billion ton robot monster here? Not I. Not... I.




Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users