Multiplayer Interactive-Fiction Game-Design Blog


Documentation – Basic Monsters Library



Download 8.87 Mb.
Page135/151
Date02.02.2017
Size8.87 Mb.
#15199
1   ...   131   132   133   134   135   136   137   138   ...   151

Documentation – Basic Monsters Library


Library with basic classes and sample monsters.

This library contains the basic cMonster class, along with some sample monsters. Use this for monsters, rather than cCharacter, because it creates a character that just attacks player characters and isn't terribly sociable.


No tutorial documentation for this library



Documentation – Extra Objects


Library of extra objects, such as furniture and food items.

This is a library of extra objects, such as furniture and food items.


No tutorial documentation for this library



Documentation – Sample world


This library provides sample code for a small world. You may wish to look at this code to see how to create a world.

This is a library for a small test world. It's included so you can look at the code to see how to create a world. If you already know how to create a world then you probably don't want this included in your project.

To get the test world to work:

1) Make sure you have installed CircumReality into c:\program files\mXac\CircumReality. If you installed to a different location then the resources won't load properly.

2) Select Misc, Compile.

3) Select Misc, Test Compiled code

4) A window will appear showing all the players that are logged in and playing at the moment; of course, this will be empty.

5) In the directory where you have saved your project (that you're working on now), you'll see a file, YourProjectName.crk. "YourProjectName" will be replaced by the filename you used for this project file.

6) Open the client, CircumReality.exe, and when selecting the world to play in, select YourProjectName.crk from whatever directory it's save in. (You can also hand this out to your friends so they can log in too.)

7) When you play using the YourProjectName.crk world-link, you'll be asked for an IP address to use. You can find the IP address by looking at the title-bar of the server window, the one that lists all current players. It'll show your current IP, or 127.0.0.1 if you're not currently connected to the internet.

8) That's all you need to get started.

No tutorial documentation for this library



Library – Standard Library

Overview


This library contains many important functions for the language.

The standard library contains many basic definitions for the language, including built-in methods for strings, lists, and those common to all objects. It also includes commonly used functions like rand(), sin(), etc.

As a general rule, you need to include this library in your project.

List of Strings


None

List of Resources


None

Method Definitions

ClassEnum


Returns a list of classes that this object is a subclass of.

This returns a list of classes that this object is a subclass of.

For example, if "dollarBill" is a subclass of "money" and "paper" then DollarBill.ClassEnum() returns ["DollarBill", "money", "paper"].

Parameter Name

Description

Return value description

List of classes that the object is a member of.

Overrides: Call only the highest priority method

Common to all objects


ClassQuery


Returns TRUE of an object is a member of the given class.

This returns TRUE of an object is a member of the given class.

For example, if "dollarBill" is a subclass of "money" and "paper" then DollarBill.ClassQuery("money") returns TRUE.

Parameter Name

Description

Class

This is the class to look query. It must be a string.

Return value description

TRUE is the object is a subclass of the class, or FALSE if it isn't.

Overrides: Call only the highest priority method

Common to all objects


Clone


Duplicates the object.

This duplaces the object.

Example:

string = "Hello Mike!";

string2 = string.Clone();

string.StringAppend ("test");

Results:

string == "Hello Mike!test";

string2 == "Hello Mike!"

Parameter Name

Description

Return value description

The cloned object.

Overrides: Call only the highest priority method

Common to all objects


Constructor


Automatically run immediately after an object is created.

If an object supports the Constructor() method then when the object is created, the Constructor() method will automtically be called.

If an object has one or more superclasses with Constructor()'s the superclass's constructors will be called first, working its way up the chain to the object's Constructor().

NOTE: The object should NOT delete itself in its own Constructor().



Parameter Name

Description

Return value description

None

Overrides: Call all the methods, from lowest to highest priority – don’t stop

Common to all objects



Download 8.87 Mb.

Share with your friends:
1   ...   131   132   133   134   135   136   137   138   ...   151




The database is protected by copyright ©ininet.org 2024
send message

    Main page