|
![]() ![]() |
|
Dreamless Dancer
|
Apr 26 2006, 09:17 PM
Post
#1
|
|
Group: Furres |
Be warned, this is complicated:
[ds]DSPK V03.00 Furcadia (0:9) When a furre arrives in the dream, (5:15) move the triggering furre to (20,20), or to someplace nearby if it's occupied. (0:2) When somebody moves into floor type 162, (1:17) and they (moved from/are standing at) floor type 160, (5:351) set variable %movefrom to the X,Y position the triggering furre moved to. (5:381) set variable %object to the object type at (%movefrom). (5:41) place object type 460 at (%movefrom). (5:532) set variable %saveto to the X,Y position of a random spot where the object is type %object somewhere in the dream, (3:2) at position (%saveto) on the map, (5:20) Move any item present 1 step(s) in the direction the triggering furre is facing. (5:41) place object type 460 at (%saveto). (5:532) set variable %moveto to the X,Y position of a random spot where the object is type %object somewhere in the dream, (5:15) move the triggering furre to (%moveto), or to someplace nearby if it's occupied. (3:1) everywhere on the whole map, (5:5) change object type %object to type 0. (5:5) change object type 460 to type %object. *Endtriggers* 8888 *Endtriggers*[/ds] DS works based on paired objects, each "door" self connects to the matching door no matter where on the map it is. Limitation is that you do need to construct each set of doors as indicated in the sample map, but other than that, them 14 lines of code handles as many doors as you wish to waste object pairs on. The objects do not have to be visible, they're visible in the demo for demonstration purposes of course. |
|
|
|
|
Tarquin Lightfoot
|
Apr 26 2006, 10:04 PM
Post
#2
|
|
Group: Furres |
OOOH how can I save this post? One thing I don't like about doors is the absulute MINOTNY of DS
|
|
|
|
|
Game
|
Apr 26 2006, 10:08 PM
Post
#3
|
|
Group: Furres |
Not so complicated if you understand variables, but DS that will come in handy. Thanks.
|
|
|
|
|
Gar
|
Apr 26 2006, 10:39 PM
Post
#4
|
|
Group: DEP Staff |
That's utterly beautiful
|
|
|
|
|
Tarquin Lightfoot
|
Apr 27 2006, 04:46 PM
Post
#5
|
|
Group: Furres |
This isn't working for me!
|
|
|
|
|
Dreamless Dancer
|
Apr 27 2006, 05:04 PM
Post
#6
|
|
Group: Furres |
Make sure you're designing the map exactly like the sample map, a specific walkable tile into a specific unwalkable tile, with one of the paired objects over the unwalkable tile. The direction of travel for the DS to trigger is from walkable tile, into unwalkable tile, at which point the DS does its magic, and finds the matching pair on the map. Having the exact same walkable -> unwalkable combination tile sets as decoration or as part of the map design will fail because then the DS will gladly teleport you to any space with the same object.
|
|
|
|
|
Kyudo
|
Apr 27 2006, 05:35 PM
Post
#7
|
|
Group: Furres |
I tried it, and I am AMAZED. Oooh, think of all the time I can save by not having to DS every single x and y position for every door!! Sure there's a little bit of extra work involved with patches, but hey, it's still a huge time saver!
|
|
|
|
|
Dreamless Dancer
|
Apr 27 2006, 05:39 PM
Post
#8
|
|
Group: Furres |
Plus you don't have to change the positions in the DS when you move a door.
|
|
|
|
|
Tarquin Lightfoot
|
Apr 27 2006, 05:49 PM
Post
#9
|
|
Group: Furres |
QUOTE(Dreamless Dancer @ Apr 27 2006, 05:04 PM) [snapback]232087[/snapback] Make sure you're designing the map exactly like the sample map, a specific walkable tile into a specific unwalkable tile, with one of the paired objects over the unwalkable tile. The direction of travel for the DS to trigger is from walkable tile, into unwalkable tile, at which point the DS does its magic, and finds the matching pair on the map. Having the exact same walkable -> unwalkable combination tile sets as decoration or as part of the map design will fail because then the DS will gladly teleport you to any space with the same object. Thing is, I got the right tiles and DS in the dream not being used as decor. But it's spawning me anywhere it wants on the ship! |
|
|
|
|
Dreamless Dancer
|
Apr 27 2006, 06:59 PM
Post
#10
|
|
Group: Furres |
Just a hair bit of clarification:
[ds](5:41) place object type 460 at (%movefrom).[/ds] That shape cannot be used in the map. I don't know what shape 460 is matter of fact, I just picked one at random. |
|
|
|
|
Kyudo
|
Apr 27 2006, 07:27 PM
Post
#11
|
|
Group: Furres |
QUOTE Just a hair bit of clarification: DragonSpeak(5:41) place object type 460 at (%movefrom). That shape cannot be used in the map. I don't know what shape 460 is matter of fact, I just picked one at random. Wait, i'm confused. Why can't we use object type 460? Or, are we supposed to choose out own object type? |
|
|
|
|
Dreamless Dancer
|
Apr 27 2006, 07:58 PM
Post
#12
|
|
Group: Furres |
QUOTE(Kyudo @ Apr 27 2006, 08:27 PM) [snapback]232122[/snapback] Or, are we supposed to choose out own object type? Exactly. |
|
|
|
|
Kyudo
|
Apr 29 2006, 01:17 PM
Post
#13
|
|
Group: Furres |
I tried doing this in my test dream, and it sorta worked. I set it up just like in your test map, but with different floors and objects. It was set up or seems to be set up basically the same way. When I go through the door, it works. When I try to go back, it doesn't. Any ideas of why this might be happening?
|
|
|
|
|
Dreamless Dancer
|
Apr 29 2006, 02:43 PM
Post
#14
|
|
Group: Furres |
The object you're moving into is the target the DS looks for to locate the other end of the teleport. If you're using something which looks correct when put on the map, but is not sitting over the unwalkable tile on one end or the other, then the teleport won't work right because it's being moved wrong.
|
|
|
|
|
Tarquin Lightfoot
|
Apr 29 2006, 03:00 PM
Post
#15
|
|
Group: Furres |
First time working with variables *blush*
|
|
|
|
|
Delehal
|
May 1 2006, 03:14 AM
Post
#16
|
|
Group: Furres |
Hmm, very interesting -- always nice to see people playing around with the system, and frankly I think this is a brilliant idea. If I might be so presumptuous, I think I might have improved on things a bit:
[ds](0:2) When somebody moves into floor type 143, (1:17) and they (moved from/are standing at) floor type 32, (5:351) set variable %pos_door_in to the X,Y position the triggering furre moved to. (5:381) set variable %door_marker to the object type at (%pos_door_in). (5:41) place object type 0 at (%pos_door_in). (5:532) set variable %pos_door_out to the X,Y position of a random spot where the object is type %door_marker somewhere in the dream, (5:14) move the triggering furre to (%pos_door_out) if there's nobody already there. (5:41) place object type %door_marker at (%pos_door_in). (5:19) move any furre present 1 step(s) forward (in the direction they're facing) if there's nobody already there.[/ds] With that, each set of doors requires only one object. There is one nagging issue -- the triggering furre seems to move two tiles forward, instead of one, but otherwise it seems to work perfectly so far. I did realize it would be easy enough to use this with extra-wide doors -- just treat it as a series of doors which happen to all be side-to-side with one another. There's still a few issues to resolve, before it can completely replace most of the door scripts I've made. Specifically, what about locking doors? And indicators that the doors have been locked or unlocked? I've got a few ideas cooking, but none of them work yet, heh. --(edit)-- [ds]*Moving between doors (0:2) When somebody moves into floor type 143, (1:17) and they (moved from/are standing at) floor type 32, (5:351) set variable %pos_in to the X,Y position the triggering furre moved to. (5:381) set variable %door_marker to the object type at (%pos_in). (5:41) place object type 0 at (%pos_in). (5:532) set variable %pos_out to the X,Y position of a random spot where the object is type %door_marker somewhere in the dream, (5:14) move the triggering furre to (%pos_out) if there's nobody already there. (5:41) place object type %door_marker at (%pos_in). (5:19) move any furre present 1 step(s) forward (in the direction they're facing) if there's nobody already there. *Step onto unlocked switch, lock door (0:2) When somebody moves into floor type 178, (5:351) set variable %pos_in to the X,Y position the triggering furre moved to. (5:381) set variable %door_switchA to the object type at (%pos_in). (5:301) copy the value of variable %door_switchA into variable %door_switchB. (5:301) copy the value of variable %door_switchA into variable %door_markerA. (5:301) copy the value of variable %door_switchA into variable %door_markerB. (5:302) take variable %door_switchB and add 2 to it. (5:302) take variable %door_markerA and add 1 to it. (5:302) take variable %door_markerB and add 3 to it. (5:532) set variable %pos_out to the X,Y position of a random spot where the object is type %door_markerA somewhere in the dream, (5:41) place object type %door_markerB at (%pos_out). (5:40) set the floor to type 160 at (%pos_out). (5:532) set variable %pos_out to the X,Y position of a random spot where the object is type %door_markerA somewhere in the dream, (5:41) place object type %door_markerB at (%pos_out). (5:40) set the floor to type 160 at (%pos_out). (5:41) place object type %door_switchB at (%pos_in). (5:40) set the floor to type 179 at (%pos_in). *Step onto locked switch, unlock door (0:2) When somebody moves into floor type 179, (5:351) set variable %pos_in to the X,Y position the triggering furre moved to. (5:381) set variable %door_switchA to the object type at (%pos_in). (5:301) copy the value of variable %door_switchA into variable %door_switchB. (5:301) copy the value of variable %door_switchA into variable %door_markerA. (5:301) copy the value of variable %door_switchA into variable %door_markerB. (5:304) take variable %door_switchB and subtract 2 from it. (5:302) take variable %door_markerA and add 1 to it. (5:304) take variable %door_markerB and subtract 1 from it. (5:532) set variable %pos_out to the X,Y position of a random spot where the object is type %door_markerA somewhere in the dream, (5:41) place object type %door_markerB at (%pos_out). (5:40) set the floor to type 143 at (%pos_out). (5:532) set variable %pos_out to the X,Y position of a random spot where the object is type %door_markerA somewhere in the dream, (5:41) place object type %door_markerB at (%pos_out). (5:40) set the floor to type 143 at (%pos_out). (5:41) place object type %door_switchB at (%pos_in). (5:40) set the floor to type 178 at (%pos_in).[/ds] That's my first shot at it -- works in testing. So, locking the doors requires two floor tiles, and four objects, here. For this script, the objects can be anything, but must be in this order: 1. unlocked switch 2. unlocked doorpad 3. locked switch 4. unlocked doorpad In case anybody wonders why I seem to be replacing objects twice: I am. Since each door has two sides, the only way I could see to make this happen is to randomly select one side, make the changes, and then "randomly" select the remaining side for changes. There's a basis there for including things like lamps which change colors, when doors are locked or open. It's similar enough to what I have here that I think you can figure it out. |
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 27th January 2012 - 04:26 PM |