Hello,
I am wondering is it possible a person can have street lights like in Ultima 5 and above? I mean, I have an object with a sprite of street light and when it becomes dark it turns on a light radius I decide like torch but without having to pick it up and use it. Can this be done? if so, can you show me how? Thanks in advance.
street light
Moderators: Ice Cream Jonsey, joltcountry
-
- Posts: 35
- Joined: Tue Apr 24, 2007 1:56 pm
street light
I WANT ULTIMA 7 OR ULTMIA 6 CONSTRUCTION SET! I WILL DO ANYTHING! PAY ANYTHING! GIVE ANYTHING !
-
- Posts: 145
- Joined: Tue Apr 10, 2007 2:49 pm
Yes. First create an obstacle called 'unlit lamp' that is not a lightsource.
Then create a custom space called 'lit lamp' and set it up with:
- Lightsouce: yes
- Passable to: If Variable A > 0
- Disappear: While impassible
- Replaced by: unlit lamp
Now create a macro, let's say it's macro # 10, with this script:
(Apparently greater and lesser than signs screw phpBB posts up even if I use the Code tag, so replace 'is less than' and 'is greater than' below with the correct symbol when in the macro editor.)
1 IF HOUR (is less than) 7 THEN 5
2 IF HOUR (is greater than) 17 THEN 5
3 SET A=0
4 STOP
5 SET A=1
6 STOP
Now go to Configure Adventure and set the Hourly Macro to your new macro (in this case, #10), and turn Day/Night Sizing on.
On your map, place the 'lit lamp' space wherever you want your lamps. Between the hours of 18 - 6 (6pm and 6am) those spaces will be 'lit lamps' providing light, outside those hours those spaces will be 'unlit lamp'. You can adjust the hours you want the lamps lit as needed.
(If you just want to have a lamp that's always on as soon as it's dark, you can skip all that stuff, and just have a 'lamp' that's set to be a lightsource -- it'll be 'on' during the day as well, but the player won't know - that effect will only be seen at night.)
JJ
Then create a custom space called 'lit lamp' and set it up with:
- Lightsouce: yes
- Passable to: If Variable A > 0
- Disappear: While impassible
- Replaced by: unlit lamp
Now create a macro, let's say it's macro # 10, with this script:
(Apparently greater and lesser than signs screw phpBB posts up even if I use the Code tag, so replace 'is less than' and 'is greater than' below with the correct symbol when in the macro editor.)
1 IF HOUR (is less than) 7 THEN 5
2 IF HOUR (is greater than) 17 THEN 5
3 SET A=0
4 STOP
5 SET A=1
6 STOP
Now go to Configure Adventure and set the Hourly Macro to your new macro (in this case, #10), and turn Day/Night Sizing on.
On your map, place the 'lit lamp' space wherever you want your lamps. Between the hours of 18 - 6 (6pm and 6am) those spaces will be 'lit lamps' providing light, outside those hours those spaces will be 'unlit lamp'. You can adjust the hours you want the lamps lit as needed.
(If you just want to have a lamp that's always on as soon as it's dark, you can skip all that stuff, and just have a 'lamp' that's set to be a lightsource -- it'll be 'on' during the day as well, but the player won't know - that effect will only be seen at night.)
JJ