Announcement: Why not try our official idea generator for inspiration when making puzzles?


Caravel Forum : DROD Boards : Architecture : Lighting question. (Yes, I'm still working on my hold.)
New Topic New Poll Post Reply
Poster Message
cheese obsessive
Level: Master Delver
Avatar
Rank Points: 222
Registered: 10-10-2004
IP: Logged
icon Lighting question. (0)  
So I'm still working on my Adventure hold when I can (It's not dead!), and I'm trying to incorporate the RPG-esque idea of being able to just walk into anyone's house and they say something like "Oh, it's so normal for you to be here!"

However, I don't want my houses to be the sizes of whole rooms, because that's a big house.

So I came up with a solution. I'd put all of the houses from a certain room in a town in a seperate room, and adding a level entrance/exit, to make it seem more like you're going inside/outside of a house. I'm covering the extra space with darkness.

So say I have a room, with six house "obstacles." I put level entrances in front of all of them, leading to a separate room containing six 8 X 8 blocks. Thusly, Beethro can move around inside of each house.

My problem is, when I'm in house number 1, I can still see the contents of houses 2-6. I tried fixing the problem by covering the houses Beethro wasn't in with Darkness, but I can't devise a way to toggle it on/off in relation to which house Beethro is in. So I just want to see house 1 when I'm in house 1. Is there a way to do this?
12-10-2007 at 10:03 PM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
Syntax
Level: Smitemaster
Rank Points: 1218
Registered: 05-12-2005
IP: Logged
icon Re: Lighting question. (0)  
Use different levels?
12-11-2007 at 01:39 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
cheese obsessive
Level: Master Delver
Avatar
Rank Points: 222
Registered: 10-10-2004
IP: Logged
icon Re: Lighting question. (0)  
Syntax wrote:
Use different levels?

I was just trying to find a way to avoid having an extra 60+ levels in the hold if it was unnecessary...
12-11-2007 at 01:43 AM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
Tahnan
Level: Smitemaster
Avatar
Rank Points: 2467
Registered: 11-14-2005
IP: Logged
icon Re: Lighting question. (0)  
Cover them with scripted characters, who are visible but disappear when Beethro enters a given house? Since you can use custom character images, you can just create a 22x22 black square as the character. (I hope that made sense.)
12-11-2007 at 02:27 AM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Jatopian
Level: Smitemaster
Rank Points: 1842
Registered: 07-31-2005
IP: Logged
icon Re: Lighting question. (+1)  
If you only use the streetlight type of lighting (the one on the objects layer), you can turn those on and off with the scripting command "Activate Item".

____________________________
DROD has some really great music.
Make your pressure plates 3.0 style!
DROD architecture idea generator
12-11-2007 at 02:27 AM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
cheese obsessive
Level: Master Delver
Avatar
Rank Points: 222
Registered: 10-10-2004
IP: Logged
icon Re: Lighting question. (0)  
Tahnan wrote:
Cover them with scripted characters, who are visible but disappear when Beethro enters a given house? Since you can use custom character images, you can just create a 22x22 black square as the character. (I hope that made sense.)

Is there an easy way to do this so I don't need to write an obnoxious script (That can be copy/pasted, but only in the same room) every room I have more than one house in? That seems like too much work, and then there are WAY too many characters on the screen.

So I tried the lights.
I still can't seem to get the light-things to work.

I'm just doing

Wait for player at (x,y)
Activate item at (x,y)

But the light goes from on to off (not off to on...). Dunno how to fix that.
12-11-2007 at 03:19 AM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
Jatopian
Level: Smitemaster
Rank Points: 1842
Registered: 07-31-2005
IP: Logged
icon Re: Lighting question. (0)  
Try making the script loop?

____________________________
DROD has some really great music.
Make your pressure plates 3.0 style!
DROD architecture idea generator
12-11-2007 at 03:40 AM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Tahnan
Level: Smitemaster
Avatar
Rank Points: 2467
Registered: 11-14-2005
IP: Logged
icon Re: Lighting question. (+2)  
cheese obsessive wrote:
Tahnan wrote:
Cover them with scripted characters, who are visible but disappear when Beethro enters a given house? Since you can use custom character images, you can just create a 22x22 black square as the character. (I hope that made sense.)

Is there an easy way to do this so I don't need to write an obnoxious script (That can be copy/pasted, but only in the same room) every room I have more than one house in? That seems like too much work, and then there are WAY too many characters on the screen.
Well, the script isn't that obnoxious:

Label Start
  Wait for entity Player x1,y1,x2,y2
  Disappear 
  Wait while entity Player x1,y1,x2,y2
  Appear 
  Go to Start


And you can paste a script from the clipboard into a character, so it shouldn't be too terribly onerous to duplicate it through multiple rooms.

Nu, it's not perfect, but it might be better than the lighting, which may or may not properly eliminate the darkness, I've never been perfectly clear on how it all works.
12-11-2007 at 11:02 AM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 5467
Registered: 02-04-2003
IP: Logged
icon Re: Lighting question. (0)  
Don't use a different level for each house -- use a distinct room for each dwelling inside a single "At home" level, which contains all the houses.
12-11-2007 at 05:07 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
Remlin
Level: Master Delver
Rank Points: 181
Registered: 04-28-2005
IP: Logged
icon Re: Lighting question. (+1)  
If it's important that the player can't see anything at all in the other houses, I think Tahnan's way is the only way to do it. (But even then, the player can still right click to find out what's on any square.) If all that's important is the effect, then having torches in each house and only lighting the ones in the house Beethro is in would be nice.

You'd probably want to have one script that immediately activates every torch (because they default to on, so this would immediately turn them all off) and then one script per house with a "wait for player at ...; activate item at ...;" to turn all the torches in that particular house back to on.
12-11-2007 at 05:16 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
cheese obsessive
Level: Master Delver
Avatar
Rank Points: 222
Registered: 10-10-2004
IP: Logged
icon Re: Lighting question. (0)  
Remlin wrote:
If it's important that the player can't see anything at all in the other houses, I think Tahnan's way is the only way to do it. (But even then, the player can still right click to find out what's on any square.) If all that's important is the effect, then having torches in each house and only lighting the ones in the house Beethro is in would be nice.

You'd probably want to have one script that immediately activates every torch (because they default to on, so this would immediately turn them all off) and then one script per house with a "wait for player at ...; activate item at ...;" to turn all the torches in that particular house back to on.


That works, thanks a lot! My problem was that I didn't realize they are defaulted to "on."

Perhaps in a future patch, include an option to pick what a light defaults to?

Yes, it's more so the effect I'm going for, I just want to create an extra "ambience" unique to each individual house. It creates the effect of knowing the houses are there, yet not being able to explore it. I don't really care if the player can see what's in the house or not, I was just going for effect-points. :)
12-12-2007 at 08:44 PM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
cheese obsessive
Level: Master Delver
Avatar
Rank Points: 222
Registered: 10-10-2004
IP: Logged
icon Another scripting question. (0)  
Alright, so I'm trying to set up a sort of "collection" side-quest in my hold. I'm doing that with a variable, object (I'm not actually using object, it's just a secret...), and the obvious way to do it is to set a bunch of characters to go object+1 when the requirement is fulfilled. But I'm also trying to add a character that will output what you've collected when you step on a certain square. So I do that by typing "you have "$object$" objects," right? I get that to work. So I expiriment linking the two characters.

I set object = 10 first, and stepped on the output square. It says "You have "10" objects." That works. So I leave the room and come back, and step on the square that sets object to object + 10. But when I step on the output, I get the message "You have 10020 objects." That's not quite correct. I swear I'm doing everything right. Anyone know the problem?
12-14-2007 at 11:05 PM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
Remlin
Level: Master Delver
Rank Points: 181
Registered: 04-28-2005
IP: Logged
icon Re: Lighting question. (+1)  
Hey Cheese, if you press ctrl-f7 you can see when variable values change, which can help track down scripting bugs. In this case you have an infinite loop that keeps adding 10. The scripting engine realizes it's stuck and breaks the loop after 1000 iterations, and 1000 iterations of adding 10 explains the result you see.

Also, you don't need to put $object$ inside quotes, you can just do "you have $object$ objects".
12-14-2007 at 11:27 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
cheese obsessive
Level: Master Delver
Avatar
Rank Points: 222
Registered: 10-10-2004
IP: Logged
icon Re: Lighting question. (0)  
Remlin wrote:
Hey Cheese, if you press ctrl-f7 you can see when variable values change, which can help track down scripting bugs. In this case you have an infinite loop that keeps adding 10. The scripting engine realizes it's stuck and breaks the loop after 1000 iterations, and 1000 iterations of adding 10 explains the result you see.

Also, you don't need to put $object$ inside quotes, you can just do "you have $object$ objects".

I'm almost positive it's an infinite loop problem...but what's wrong with what I have?

Label 1
Wait for player at 12,18 - 12,18
object +10
go to 1
12-15-2007 at 12:28 AM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
Chaco
Level: Smitemaster
Rank Points: 3772
Registered: 10-06-2005
IP: Logged
icon Re: Lighting question. (+1)  
After executing the "object + 10" statement, the "go to" statement is executed, and this happens infinitely because the condition tests true every time.

You need a "wait 1 turn" statement somewhere in your loop - then object will be incremented by 10 each turn the player stands in that location. :)

____________________________
Quick links to my stuff (in case you forgot where it was):
Click here to view the secret text

12-15-2007 at 12:30 AM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
Sillyman
Level: Smiter
Avatar
Rank Points: 339
Registered: 09-08-2006
IP: Logged
icon Re: Lighting question. (+1)  
Better yet, wait 0.

____________________________
Who, me?
FNORD
12-15-2007 at 01:31 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
cheese obsessive
Level: Master Delver
Avatar
Rank Points: 222
Registered: 10-10-2004
IP: Logged
icon Re: Lighting question. (0)  
Wow, too obvious. Thanks, man. X_x

...But isn't it always too obvious?
12-15-2007 at 04:48 AM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Architecture : Lighting question. (Yes, I'm still working on my hold.)
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.9
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.