Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Map Description


elementaldisaster
 Share

Recommended Posts

Hey!

I'm working on a pirate game project, which is based in an archipelago with many islands.

I would however like to add some kind of "island description" for each island. Example:

In map properties there is a large text box where you can enter this description, along with some basic info about the island. Each island is made using one map. On the sidebar there will be a button which will display the islands info.

I think this feature should be fairly easy to create, but honestly I'm not the best with source codes, so if anyone could help point me in the right direction that would be great! ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png)

I hope you understand what I mean, it's not easy to explain ^^

Really appreciate all replies and thanks for reading ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png)
Link to comment
Share on other sites

Yes. It is fairly easy to do ![^_^](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/happy.png)

Go to the map rec, and put there this```

Description as string * 100

```

**Do that for both the server and client.**

Now go to the client. Go into the Map Editor, and put there a textbox to write the description in. Double click on the textbox and put there something like this

```

map.Description = txtDescription.text

```

Now look for this

```

Put #f, , Map.MaxY

```

and put there this underneath it.

```

Put #f, , Map.Description

```

Now look for

```

Get #f, , Map.MaxY

```

and put there this underneath it.

```

Get #f, , Map.Description

```

Now look for```

Map.MaxY = Buffer.ReadByte

```

and put there this underneath it.

```

Map.Description = Buffer.ReadString

```

Now look for

```

Buffer.WriteByte .MaxY

```

and put there this under it

```

Buffer.WriteString .Description

```

Save, and compile. Now to the server! Look for

```

Put #f, , Map(mapnum).MaxY

```

and put there this underneath it.

```

Put #f, , Map(mapnum).Description

```

Now look for

```

Get #f, , Map(i).MaxY

```

and put there this underneath it.

```

Get #f, , Map(i).Description

```

Look for

```

Map(mapnum).MaxY = Buffer.ReadByte

```

and put there

```

Map(mapnum).Description = Buffer.WriteString

```

Look for

```

Buffer.WriteByte Map(mapnum).MaxY

```

and put there

```

Buffer.WriteString Map(mapnum).Description

```

Save, and compile! Now you need to delete your maps, or make a converter to avoid losing your maps. Let me know if you run into any problems!
Link to comment
Share on other sites

> firgured it out, thanks for the help, gonna try sort out the display now ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png)

No problem! Let me know if you have any issues ![^_^](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/happy.png)
Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...