more explanation of it:
player: the (Player) OBJECT
player.parent: the (usually) ROOM that the (Player) Object is within
team_member_1: the (non-player non-room) OBJECT
team_member_1.parent: the (usually) ROOM that the (team_member_1) Object is within
if (not team_member_1.parent = player.parent) { // if the Room that team_member_1 is in, is not the same Room as the 'player' is in,
team_member_1.parent = player.parent // set~move the team_member_1's Room that he~she~it is in, BE the Room that the 'player' is in.
}
and for what you want spefically (but not in full form ~ just a sample example):
if (team_member_1.parent = player.parent) { // if the Room that 'team_member_1' is in, is the same Room that 'player' is in,
// your Room 'description' Scripts or npc (team_member_1) 'look~lookat' Scripts or your 'pc~you~player' commenting 'msg' Scripts or whatever other description scripts based upon the two Objects being there together
} else {
// the description scripts for being there alone
}
--------------
even more explanation of it:
you both start out in the same room:
HK is going to be the LEADER, and Marzipan, the FOLLOWER, hehe.
HK.parent = room
Marzipan = room
I move to another room, 'room2' :
HK.parent = room2
and, in knowing what room, you can simply do the same:
Marzipan.parent = room2
HOWEVER... what if HK can move to any one of these rooms: room2, room3, or room4 ???
we can *NO* longer do the 'static' simple method of:
Marzipan.parent = ... (BECAUSE: what room is HK in ~ what room did HK moved to, ????)
so, instead, we're simply going to SET Marzipan to being in whatever room that HK is in, via:
Marzipan.parent = HK.parent
the 'parent' Room that Marzipan is (put~moved~set with)-in, is to be whatever the 'parent' Room that HK is (set) within.
if HK.parent = room2, then, conceptually:
Marzipan.parent = HK.parent = room2
~OR~
Marzipan.parent = room2 = HK.parent
if HK.parent = room 4, then conceptually:
Marzipan.parent = HK.parent = room4
~OR~
Marzipan.parent = room4 = HK.parent
so, this is how:
Marzipan.parent = HK.parent
works for when DYNAMIC usage is needed~done.
----------
STATIC situation:
HK.parent = room2
thus we can do:
Marzipan.parent = room2
--------
DYNAMIC situation:
HK and Marzipan both begin in the same ROOM: 'room',
but then HK is randomly (set ~ re-set ~ moved to) either: room2, room3, or room4:
HK.parent = ObjectListItem (global_data_object.room_objectlist_attribute, GetRandomInt (0, ListCount (global_data_object.room_objectlist_attribute) - 1) )
<object name="room">
<object name="HK">
// done by the quest engine (hidden from you): <parent type="object">room</attr>
</object>
<object name="Marzipan">
// done by the quest engine (hidden from you): <parent type="object">room</attr>
</object>
</object>
<object name="room2">
</object>
<object name="room3">
</object>
<object name="room4">
</object>
<object name="global_data_object">
<attr name="room_objectlist_attribute" type="objectlist">room2;room3;room4</attr>
</object>
<turnscript name="global_turnscript">
<enabled />
<script>
HK.parent = ObjectListItem (global_data_object.room_objectlist_attribute, GetRandomInt (0, ListCount (global_data_object.room_objectlist_attribute) - 1) )
</turnscript>
~ OR (this is the exact same thing as above) ~
<object name="room">
</object>
<object name="room2">
</object>
<object name="room3">
</object>
<object name="room4">
</object>
<object name="HK">
<parent type="object">room</attr>
</object>
<object name="Marzipan">
<parent type="object">room</attr>
</object>
<object name="global_data_object">
<attr name="room_objectlist_attribute" type="objectlist">room2;room3;room4</attr>
</object>
<turnscript name="global_turnscript">
<enabled />
<script>
HK.parent = ObjectListItem (global_data_object.room_objectlist_attribute, GetRandomInt (0, ListCount (global_data_object.room_objectlist_attribute) - 1) )
</turnscript>
thus we MUST do:
Marzipan.parent = HK.parent
<turnscript name="global_turnscript">
<enabled />
<script>
HK.parent = ObjectListItem (global_data_object.room_objectlist_attribute, GetRandomInt (0, ListCount (global_data_object.room_objectlist_attribute) - 1) )
Marzipan.parent = HK.parent
</turnscript>