View Full Version : Making a barrier on a mapscript


TC01
Jul 20, 2009, 07:25 PM
For my Wormholes mod(mod) of Final Frontier (Star Trek), I want to add a option to make a barrier between the two wormholes (which would then appear on seperate sides of the mapscript). The simplest way to do this, it would seem, would be to make a line of nebulae (impassible feature) vertically, down the center of the map.

Unfortunately, I have no idea how to do this. Or rather, I had ideas, but they didn't work.

I need to do two things:

1. Make a vertical barrier across the map.

2. Make it so that the Wormhole appears on different sides of the barrier. (only 2 are created).

Can anyone help me with this? Thanks in advance.

cephalo
Jul 20, 2009, 09:56 PM
It's been a long time since I did FF stuff, but placing nebula should work fine. What was the issue?

TC01
Jul 21, 2009, 09:36 AM
The main problem is that I'm not really sure how to use CyMap() functions in a mapscript- do I use the prefix "self.", as I've seen with global context functions? Or something else?

Because then I could simplify my code by a lot, and better be able to figure out what my problem is.

cephalo
Jul 21, 2009, 11:21 AM
usually at the beginning of your function you'll have

theMap = CyMap()

then you just call the functions like theMap.setTerrainType(blah)

TC01
Jul 22, 2009, 06:24 PM
usually at the beginning of your function you'll have

theMap = CyMap()

then you just call the functions like theMap.setTerrainType(blah)

Okay, thanks cephalo. Using the actual functions was much better then the convoluted way I got the center of the map...

The barrier works.

TC01
Jul 23, 2009, 05:41 PM
I spoke too soon...

The nebula barrier itself works fine.

But, occasionally my wormholes all end up on the same side of the map, making movement across the barrier impossible.

Is there a way I can make sure that each wormhole ends up on each side of the barrier? (Most times this happens because I'm basically splitting the map in half, but it doesn't always...)