FAQ Search Memberlist Usergroups
Jolt Country Forum Index
Register Profile Log in to check your private messages Log in
Log in Log in

Same room, different graphic redux

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Jolt Country Forum Index -> Hugo's House of Horrors
View previous topic :: View next topic  
Author Message
Hugella
Guest





PostPosted: Wed Mar 10, 2004 11:07 am    Post subject: Same room, different graphic redux Reply with quote

Back in 2000, Jonsey posted <a href="http://groups.google.com/groups?q=hugo+group:rec.arts.int-fiction&start=330&hl=en&lr=&ie=UTF-8&group=rec.arts.int-fiction&scoring=d&selm=3a13a26f.374079497%40news&rnum=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?
Back to top
Kent



Joined: 27 Jun 2003
Posts: 119

PostPosted: Wed Mar 10, 2004 5:22 pm    Post subject: graphic property routine Reply with quote

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:

Code:

graphic
{
     if roomdoor is open
          return "roomgraphic_dooropen"
     else
          return "roomgraphic_doorclosed"

     etc.
}


That way, all the logic for the room's graphic gets kept in one place.
Back to top
View user's profile Send private message
Ice Cream Jonsey



Joined: 27 Apr 2002
Posts: 20088
Location: Colorado

PostPosted: Mon Mar 29, 2004 11:44 am    Post subject: Reply with quote

Whoa! Thought I responded to this.

I use this method:

Code:

   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 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
_________________
the dark and gritty...Ice Cream Jonsey!
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Hugella
Guest





PostPosted: Mon Mar 29, 2004 3:55 pm    Post subject: Reply with quote

Robb, I'd be happy to see *any* source code you wanted to share. As much as possible! :)

Seriously though, I'd appreciate it.
Back to top
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Jolt Country Forum Index -> Hugo's House of Horrors All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001 phpBB Group

Theme by Kage Musha - RPG Garden

Copyrights and trademarks are all of the belonging company. No copyright Infringement intended