Object in multiple location?

4 views
Skip to first unread message

Eric F.

unread,
Aug 3, 2011, 3:28:34 AM8/3/11
to jacl-discuss
I was wondering if it was possible to have objects in multiple
locations. I'm thinking for example to a river, the sun, the sky etc.

It's still possible to create multiple objects with the same
descriptions, so it's not really a problem.

Stuart Allen

unread,
Aug 3, 2011, 8:48:23 AM8/3/11
to jacl-d...@googlegroups.com
In this situation I normally just move the object in the +eachturn
function. To make the code simple I normally define a custom attribute
and give all the locations the objects should be in that attribute. A
common example is giving objects the pre-defined attribute OUTDOORS.
Give all the locations that are outdoors that attribute and then add
code such as:

{+eachturn
if here has OUTDOORS
move sun to here
move sky to here
else
move sun to limbo
move sky to limbo
endif
}

That was those objects will visible when outdoors, but not otherwise.
Also, remember to give those objects the OUT_OF_REACH attribute so the
player can't touch them!

Stuart

--
http://dangarstu.tumblr.com

Eric F.

unread,
Aug 3, 2011, 6:03:45 PM8/3/11
to jacl-discuss
>In this situation I normally just move the object in the +eachturn function.

Thank you, I like this, and I've added it to my code.


Reply all
Reply to author
Forward
0 new messages