Object that exists in several rooms
ender
22 Nov 2011, 20:51In the game I'm working on, the player has a starship and I want the player to be able to interact with the computer from anywhere on the ship ... my plan is to have the computer be an object ... but what I'm running into, is that I need the computer to object to be accessible from every room on the ship for the player to interact with it... so how would that be done? Any ideas?
The only idea I've come up with so far is to put a 'on entry' script into each room in the ship and have it move the computer object into the room that way. Is that the best way?
The only idea I've come up with so far is to put a 'on entry' script into each room in the ship and have it move the computer object into the room that way. Is that the best way?
The Pixie
23 Nov 2011, 09:27That is the best solution I cam up with.
Alex
23 Nov 2011, 09:48Another way would be to copy the ScopeReachableNotHeldForRoom function into your game, and then add your "computer" object to the result list.
I'd like some way of making this easier in future versions. I was already thinking of having on the room editor a list where you could add objects into the room's scope. But that wouldn't help too much for "universal" objects, as you wouldn't want to have to add the computer to the "extra objects in scope" list for every room. So maybe something in the game options... but then, if you have non-ship areas in your game, you wouldn't want the computer there too. I suppose if all your ship rooms were inside a "ship" object, you could add computer to an "extra objects in scope for all sub-rooms" list for the ship object. Happy to hear any other suggestions!
I'd like some way of making this easier in future versions. I was already thinking of having on the room editor a list where you could add objects into the room's scope. But that wouldn't help too much for "universal" objects, as you wouldn't want to have to add the computer to the "extra objects in scope" list for every room. So maybe something in the game options... but then, if you have non-ship areas in your game, you wouldn't want the computer there too. I suppose if all your ship rooms were inside a "ship" object, you could add computer to an "extra objects in scope for all sub-rooms" list for the ship object. Happy to hear any other suggestions!

Pertex
23 Nov 2011, 11:40Alex wrote:
I'd like some way of making this easier in future versions. I was already thinking of having on the room editor a list where you could add objects into the room's scope. But that wouldn't help too much for "universal" objects, as you wouldn't want to have to add the computer to the "extra objects in scope" list for every room. So maybe something in the game options... but then, if you have non-ship areas in your game, you wouldn't want the computer there too. I suppose if all your ship rooms were inside a "ship" object, you could add computer to an "extra objects in scope for all sub-rooms" list for the ship object. Happy to hear any other suggestions!
Why do you need an extra list for this? If your object is in the parent-room, it could be seen/used/... in the sub-rooms. I think we talked about this in the context of scenery objects like trees in a forest. This is already working with turnscripts e.g.
Alex
23 Nov 2011, 16:01It works already only if those rooms are transparent. But you might want one object to be available in rooms A and B, but not be able to see other objects in room B while you're in room A.
Jhames
23 Nov 2011, 20:52I don't know if I say a stupid thing, but...
What's happens if you make a big computer... in one room... an make several "terminals" in the others rooms you like ???


What's happens if you make a big computer... in one room... an make several "terminals" in the others rooms you like ???



Pertex
24 Nov 2011, 09:12Alex wrote:It works already only if those rooms are transparent. But you might want one object to be available in rooms A and B, but not be able to see other objects in room B while you're in room A.
Sorry I dont understand this. I only know the transparent-attribute of container, so is there the same with rooms? Is this attribute used with rooms at the moment?
A room could only shows the objects of this room and of all its parentrooms, even if the rooms are not transparent
ender
25 Nov 2011, 00:20While I'm not quite sure how to implement it in the current version of Q5 ... maybe by modifying the "ScopeReachableNotHeldForRoom" function ... but ... overall, I was thinking that an object in a main room should be visible in sub-rooms without transparent ... maybe it has a boolean variable like 'ShowInSubRooms' ... and you check that and it shows in sub-rooms whether they are transparent or not.