Jump to content


Photo

Script objects for chests and doors


  • Please log in to reply
4 replies to this topic

#1 temnix

temnix
  • Member
  • 983 posts

Posted 10 November 2016 - 08:07 AM

I looked through OBJECT.IDS and I don't see anything specifically related to chests and only one group of objects for doors - NearestDoor etc. So how does the game engine (I mean BG:EE here) handle creatures' interaction with chests and doors? This is probably a big topic, so I'd appreciate a link to some tutorial, if there is one. And those NearestDoor etc. objects - do they work for chests as well?



#2 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5150 posts

Posted 10 November 2016 - 08:22 AM

Well, containers(treasure chests etc) are usually referred by their area name, aka the one they have the .are file.. and exits are too.

Edited by The Imp, 10 November 2016 - 08:23 AM.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#3 temnix

temnix
  • Member
  • 983 posts

Posted 10 November 2016 - 09:42 AM

So there is no general object type for containers? That's too bad, though at least I won't spend time looking for that. Thanks. How about a See() check for them? See() notices things other than creatures, that much I know. There are things like Seeing a trap in creatures' scripts... So it is possible to See static objects (as far as I understand, traps, chests and doors are all static objects). The syntaxis for seeing any creature is [ANYONE]. Do you know if there is a corresponding bit for static objects, like [ANYTHING]?

 

I'm thinking that if I could write a trigger that includes everything and then excludes creatures, so ![ANYONE], that would leave me with static objects.



#4 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5150 posts

Posted 10 November 2016 - 10:50 AM

I would almost bet that there isn't a thing like the engine. See the scripts that usually act on these objects, usually do it once and only at the start of the even, what ever it is that edits them. Say like the party goes to an area, the area script runs and adds an object to a container ... and then that portion of the script will never activate again as it sets a global/locals or what ever.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#5 temnix

temnix
  • Member
  • 983 posts

Posted 10 November 2016 - 02:59 PM

Yes, I know that's how it works in the scripts that we have. But there are loopholes in this engine even the designers don't know about. I need a way to stretch the rules.