Back in 2000, Jonsey posted <a href="http://groups.google.com/groups?q=hugo+ ... num=340">a question</a> to raif asking basically, how can i get a single room object to display multiple pictures based on the current status of that room.
Did you ever get an answer? (Google doesn't record one.)
If so, what is it?
Same room, different graphic redux
Moderators: Ice Cream Jonsey, joltcountry
-
- Posts: 119
- Joined: Fri Jun 27, 2003 12:10 pm
graphic property routine
Hmm. Actually that should work (the example Robb posted). I don't remember if we eventually figured out what was going on or not.
Anyway, what I usually use is a property routine. (This example is a lot simpler if you assume all graphics are in the same resourcefile.)
So in the room object, I might have something like:
That way, all the logic for the room's graphic gets kept in one place.
Anyway, what I usually use is a property routine. (This example is a lot simpler if you assume all graphics are in the same resourcefile.)
So in the room object, I might have something like:
Code: Select all
graphic
{
if roomdoor is open
return "roomgraphic_dooropen"
else
return "roomgraphic_doorclosed"
etc.
}
- Ice Cream Jonsey
- Posts: 30193
- Joined: Sat Apr 27, 2002 2:44 pm
- Location: Colorado
- Contact:
Whoa! Thought I responded to this.
I use this method:
If I remember right, the thing I was missing was the "return -1" bit.
If you're stuck at all, Hugella, just let me know. I've got plenty of source code I can send you with multiple graphics going on in the same room. I did wrestle with it for a night a few years ago, but Kent pointed me in the right direction, and I definitely hope that getting it working yourself doesn't slow you down, because the solution's all there.
Robb
I use this method:
Code: Select all
graphic
{
select(LocationState[11])
case 1
{
current_resource_file = "mall"
current_resource = "sporting01"
}
case 2
{
current_resource_file = "mall"
current_resource = "sporting02"
}
case 3
{
current_resource_file = "mall"
current_resource = "sporting03"
}
else
{
current_resource_file = "mall"
current_resource = "sporting01"
}
return -1
}
If you're stuck at all, Hugella, just let me know. I've got plenty of source code I can send you with multiple graphics going on in the same room. I did wrestle with it for a night a few years ago, but Kent pointed me in the right direction, and I definitely hope that getting it working yourself doesn't slow you down, because the solution's all there.
Robb
the dark and gritty...Ice Cream Jonsey!