I haven't tested the GCube yet. I got tripped up for a while over why one of my maps wasn't loading but that's been fixed now. One little typo can create so much chaos.
Step 4: EVENTS and TRAPS
Since this gets into some minor scripting, check out the...
Scripting Tutorial
Anyways, what good dungeon crawler doesn't contain some wraparound magic?
It is fairly simple to use in DW. All you need is
wrap.py which is in the data/scripts folder
Code: Select all
#Wrap Around
from eventAPI import *
from APIUtils import *
def fireEvent(e):
return 0
Now we go to the events file of the map that we want to use the wraparound in.
The Format is
<triggerX> <triggerY> <event Processor>
<reboundX> <reboundY> <reboundFaceAngle> <scriptName>
Code: Select all
#zzshrine1Events.cfg
13 15 2000
27 15 90 wrap
Line 1:
triggerX – the x location that triggers this event
triggerY – the y location that triggers this event
eventProcessor – this is the number of the event to trigger, and will most
commonly be 2000 – which is the python interpreter that handles scripted
combats, stairs or other map changes, messages to player, plot
advancement, etc. Other event numbers are listed in the next section
Line 2:
reboundX – the x location the character is rebounded to once the script
terminates with a false (0) result
reboundY – the y location the character is rebounded to once the script exits
with a false (0) result
reboundFaceAngle – the angle the character is facing on rebound –
0 = north, 90 = west, 180 = south, 270 = east
scriptName – the name of the python file to invoke without the .py extension,
ie – if we wanted to call wrap.py from this location, we would use
wrap for the script name.
You can use multiple wrap events so that when walking north, you reach an event that wraps you around to the south area of the map, south to the north, east to the west, west to the east. etc.
Like so.
Code: Select all
#zzshrine1Events.cfg
#
#14 22 2000
#15 22 270 zzshrine1out
#Western wraparounds
13 15 2000
27 15 90 wrap
13 17 2000
27 17 90 wrap
13 19 2000
27 19 90 wrap
13 21 2000
27 21 90 wrap
13 23 2000
27 23 90 wrap
13 25 2000
27 25 90 wrap
13 27 2000
27 27 90 wrap
#Southern and Northern wraparounds
15 13 2000
15 27 180 wrap
15 29 2000
15 15 0 wrap
17 13 2000
17 27 180 wrap
17 29 2000
17 15 0 wrap
19 13 2000
19 27 180 wrap
19 29 2000
19 15 0 wrap
21 13 2000
21 27 180 wrap
21 29 2000
21 15 0 wrap
23 13 2000
23 27 180 wrap
23 29 2000
23 15 0 wrap
25 13 2000
25 27 180 wrap
25 29 2000
25 15 0 wrap
27 13 2000
27 27 180 wrap
27 29 2000
27 15 0 wrap
#Eastern wraparounds
29 15 2000
15 15 270 wrap
29 17 2000
15 17 270 wrap
29 19 2000
15 19 270 wrap
29 21 2000
15 21 270 wrap
29 23 2000
15 23 270 wrap
29 25 2000
15 25 270 wrap
29 27 2000
15 27 270 wrap
When using wraparounds on your maps it is important to make the map a bit larger than the area that you will wraparound, and put walls, doors etc. outside of the wraparound zone so to resemble the same walls, doors on each of the opposite sides.