One object in two locations?

This forum is the place to learn about and discuss ADRIFT 5. Feel free to mention any bugs you find here, but please also add these to the Bugs & Enhancements list.

Please also refer to the ADRIFT 5 Wiki for more information.
Post Reply
User avatar
P/o Prune
Site Admin
Posts: 4707
Joined: Mon Jun 24, 2002 9:18 am
Points: 93
Location: Denmark

One object in two locations?

Post by P/o Prune »

In short. How do I manage to have one object appear in two locations?
In the game, the player is inside a house. There are two locations. A northern corridor and a southern corridor. In order to get from south to north he has to pass over a huge hole in the floor.
The hole is easy enough. I have made object a gaping hole and it is set in group Corridor.
My problem is that if the player coveres the hole with a board in Corridor South and then >move north, the board will not be in the northern corridor. And vice versa, of course.
I believe the problem is that the action in the task is Place board "somewhere" in group Corridor. So that would have to be changed somehow.

Suggestions?
D-Day in progress 86Kb (Slowly drifting)
October 31st: 42Kb (possible entry for IFComp 2021 :wink: )
User avatar
Denk
Posts: 650
Joined: Mon Feb 22, 2016 6:21 pm
Points: 251
Location: Hjørring, Denmark

Re: One object in two locations?

Post by Denk »

Static objects can be in more than one location but dynamic objects cannot (only sort of - see below)

I can think of the following solutions:
1. Every time you walk across the board, you move the board to the other location.
or:
2. Once you have placed the board, replace it with a static board object, which can be in more than one location.
or:
3. Make the hole a supporter and put the board on the hole. Then the dynamic object on top of the hole can be examined, taken etc. from both locations. This solution might have all sort of problems including sentences like "A board is on the hole.", and that the player can put things on the hole unless you prevent them. But it is certainly doable.
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
User avatar
P/o Prune
Site Admin
Posts: 4707
Joined: Mon Jun 24, 2002 9:18 am
Points: 93
Location: Denmark

Re: One object in two locations?

Post by P/o Prune »

Thanks Denk.
I will give it a try and see what comes out of it.
Just for info. I have already made the hole a supporter, hoping that that would solve the problem. Well, it didn't and the board is still only in the location in which is was place on the hole.
D-Day in progress 86Kb (Slowly drifting)
October 31st: 42Kb (possible entry for IFComp 2021 :wink: )
User avatar
Denk
Posts: 650
Joined: Mon Feb 22, 2016 6:21 pm
Points: 251
Location: Hjørring, Denmark

Re: One object in two locations?

Post by Denk »

P/o Prune wrote: Mon Oct 19, 2020 5:11 pm Thanks Denk.
I will give it a try and see what comes out of it.
Just for info. I have already made the hole a supporter, hoping that that would solve the problem. Well, it didn't and the board is still only in the location in which is was place on the hole.
That is because you move it into a group. You should not do that. You should move it onto object 'hole' instead when you place the board. And if you have a restriction that is checking if the board is in a certain location, you must change it to check if it is on the hole.
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
User avatar
P/o Prune
Site Admin
Posts: 4707
Joined: Mon Jun 24, 2002 9:18 am
Points: 93
Location: Denmark

Re: One object in two locations?

Post by P/o Prune »

:thanks:
It worked perfectly.
Thanks a million.
D-Day in progress 86Kb (Slowly drifting)
October 31st: 42Kb (possible entry for IFComp 2021 :wink: )
Post Reply