• All, Gmail is currently rejecting messages from my host. I have a ticket in process, but it may take some time to resolve. Until further notice, do NOT use Gmail for your accounts. You will be unable to receive confirmations and two factor messages to login.

Documentation Project

There is something which needs to be fixed on the manual - subject_to_minz / subject_to_maxz

According to the classic manual:
subject_to_minz {int}

~This command toggles minimum Z bounding for entity on field.
0 = Entity can't move beyond current zmin or minimum z. Default for most entities.
1 = Entity can move beyond current zmin or minimum z. Default for panel type entities.

subject_to_maxz {int}

~This command toggles maximum Z bounding for entity on field.
0 = Entity can't move beyond current zmax or maximum z. Default for most entities.
1 = Entity can move beyond current zmax or maximum z. Default for panel type entities.

This is not true at all. And it won't make sense to have something SUBJECT to something but wilth a FALSE value.
I've checked the source code and yes - its reversed on the manual.
Code:
    // -----------bounds checking---------------
    // Subjec to Z and out of bounds? Return to level!
    if (self->modeldata.subject_to_minz > 0)
    {
        if(z < PLAYER_MIN_Z)
        {
            zdir = PLAYER_MIN_Z - self->position.z;
            execute_onblockz_script(self);
        }
    }

The right should be:

subject_to_minz {int}

~This command toggles minimum Z bounding for entity on field.
0 = Entity can move beyond current zmin or minimum z. Default for panel type entities.
1 = Entity can't move beyond current zmin or minimum z. Default for most entities.

subject_to_maxz {int}

~This command toggles maximum Z bounding for entity on field.
0 = Entity can move beyond current zmax or maximum z. Default for panel type entities.
1 = Entity can't move beyond current zmax or maximum z. Default for most entities.

Edit: fixed.
 
Something I've found and its not documented in neither manual: getmodelproperty / changemodelproperty.

I saw some replies using those but there isn't much information on what each values does
-  http://www.chronocrash.com/forum/index.php?topic=246.msg1425#msg1425
- http://www.chronocrash.com/forum/index.php?topic=2114.msg28345#msg28345

Based on what I got from the topics and source code:

getmodelproperty({model}, {property})
•model - INDEX (and not name) of the model*
•property - index of properties
0 = loadflag
1 = model
2 = name
3 = path
4 = selectable

Correct me if I am wrong, but:

INDEX - all entities have an index when they are loaded?

loadflag = tell if the model is loaded or not, and return 1 if is loaded and 0 if not? KNOWed models will return 0?
model = the model of INDEX above
name = name of the model
path = path to the model file
selectable = tells if the model is selectable. Returns 1 if it's selectable, or 0 if not.

changemodelproperty({model}, {property}, {value})
•model - name of the model
•property - index of properties
•value - value of the property

From what I saw in the source code, the indexes from 0-3 can't be changed (their codes are commented on the source), only the index 4 (selectable)
selectable = tells if the model is selectable. Returns 1 if it's selectable, or 0 if not.

Code:
changemodelproperty(modelIndex,4,1); // on
changemodelproperty(modelIndex,4,0); // off

Damon Caskey Can you give a hand here?

 
You are more or less correct. However, that function was really more of an experiment than anything else. It falls under "punch myself in the face" coding category and I'm literally writing its replacement as we speak.

DC
 
You got it right IIRC. I'm documenting as I go with detail in wiki with replacements.

DC
 
Damon Caskey said:
However, that function was really more of an experiment than anything else. It falls under "punch myself in the face" coding category and I'm literally writing its replacement as we speak.

Experiment? no wonder it has a flaw. Other than that, it works well to lock certain player

If it were to be replaced, I'd have to prepare replacement code to replace my character lock system
 
How come counterframe is not in the manual? Is it depreciated/deprecated?

counterframe

counterframe {frame} {cond} {damaged}
  • This command is to make entity performs FOLLOW{#} if the entity is hit in set frame.
  • frame determines at which frame if entity is hit , FOLLOW{#} would be played.
  • cond determines the condition requirements before FOLLOW{#} is played.
1: The counter will always be used.

2: The counter will be used as long as the attacker was an enemy (Or a player if an enemy uses it).

3: The counter will be used as long as the attacker was an enemy, the attack was not unblockable, hits the user from the front, and was not a FREEZE attack.

  • damaged determines whether the entity will receive damage from the hit or not.
0, the damage won't be taken

1, the damage will be taken
 
maxman, counterframe is depreciated. It was replaced by counterrange, which does the same thing but lets you define a range of frames instead of only allowing one.

DC

 
This is because it is mentioned in followanim in the manual.

followanim {value}

    ~Determines which FOLLOW animation played when followup condition is met or when counter condition is met.
    ~Possible values are 1, 2, 3 and 4.
    ~Used together with 'followcond' or 'counterframe'.
 
So it makes sense to be added to the manual and I've added it.

btw, I've fixed a wrong text here:

counterrange {start} {end} {condition} {damage}

~Animation header. If all conditions are met, entity will perform animation set by followanim. This command is outdated and only included for backward compatibility. Use Counterrange instead.

plus, I am changing some text formating for the legacy manual, to make it easier to be read.
 
Something I've tried and works: in Select files, you CAN use loopoffset too:

music   data/music/select.ogg 1 466404

music {path} {loop} {offset}

{path} points to a .bor music file which will be played during this select screen.
{loop} determines if the music loops.
0 = no looping.
1 = looping.
{offset} determine the loop point, in samples, off a music.

The manual says this about the the offset:
{offset} is position in bytes music will return to when it loops. For instance, with a .bor file with 128000 byte size, setting offset to 64000 would make music loop from halfway of the music.
Maybe this can be true for .bor files, but for .ogg files (as uTunnel said many time ago), it works in SAMPLES, not bytes. To get the right sample count of the loop, you need to use a audio edit software (GoldWave, Audacity, etc) and some music knowledge.

 
Textobjects doesn't works outside levels, only drawstrings.

Damon Caskey said:
I can confirm that for you guys. Text objects will NOT work outside of a level. They are run as part of the level loop cycle. It follows that if a level isn't running, text objects are not running either. If you want custom text outside of game play, you must use the drawstring functions.

DC
 
Another thing to document: layer properties / changelayerproperty / getlayerproperty

I will need time to document it because Its a bit complex.

Those are the layer properties you can control:
      "alpha",
        "amplitude",
        "bgspeedratio",
        "enabled",
        "neon",
        "quake",
        "transparency",
        "watermode",
        "wavelength",
        "wavespeed",
        "xoffset",
        "xratio",
        "xrepeat",
        "xspacing",
        "z",
        "zoffset",
        "zratio",
        "zrepeat",
        "zspacing",

And those are the layer types:
background,
bglayer,
fglayer,
frontpanel,
generic*,
neon,
panel,
screen,
water,

About the "GENERIC" type, we need to figure out but it seams to be "just a way to access to whole list of layers. IIRC, OpenBOR keeps one big list of all layers combined.
That may just be a way to access it. Kind of useless because you'd have no clue which layer is what, but could be helpful in some special cases, like blanking out the whole screen."
But we need to confirm it.
 
O Ilusionista said:
Another thing to document: layer properties / changelayerproperty / getlayerproperty

I will need time to document it because Its a bit complex.

Those are the layer properties you can control:
      "alpha",
        "amplitude",
        "bgspeedratio",
        "enabled",
        "neon",
        "quake",
        "transparency",
        "watermode",
        "wavelength",
        "wavespeed",
        "xoffset",
        "xratio",
        "xrepeat",
        "xspacing",
        "z",
        "zoffset",
        "zratio",
        "zrepeat",
        "zspacing",

And those are the layer types:
background,
bglayer,
fglayer,
frontpanel,
generic*,
neon,
panel,
screen,
water,

About the "GENERIC" type, we need to figure out but it seams to be "just a way to access to whole list of layers. IIRC, OpenBOR keeps one big list of all layers combined.
That may just be a way to access it. Kind of useless because you'd have no clue which layer is what, but could be helpful in some special cases, like blanking out the whole screen."
But we need to confirm it.
O Ilusionista very good, thanks man! Layer properties can help a lot to change the level design without creating more entities
 
Kratus indeed they are! There are some funny things there - for example, it looks like you can use more than one frontpanel at the same time (not much useful, but hey).
 
Guys, I've realized that "scrollx (min) (max)" level property isn't documented in any manual. Not even the OpenBORstats documentation reconizes it.
While I was looking into the source code, I've discovered that is a "scrollz (min) (max)".

I haven't found on the source any explanation how it works, I just had found this:
openborscript.c
Code:
extern float   scrolldx;
extern float   scrolldx;
extern float   scrolldy;
extern float   scrollminz;
extern float   scrollmaxz;
extern float   scrollminx;
extern float   scrollmaxx;

commands.c
Code:
    LIST_ADD(CMD_LEVEL_SCROLLX, "scrollx");
    LIST_ADD(CMD_LEVEL_SCROLLZ, "scrollz");

Do anyone have more info about it or could explain how it works, so I can document it?
Damon Caskey  Bloodbane ?
 
Oh I thought scrollx has been documented.

Okay, scrollx defines how far to the left and right player can scroll. To be detailed, parameters defines min scrollpos and max scrollpos.

For instance, scrollx 50 600 will allow player to scroll left to scrollpos 50 and scroll right to scrollpos 600. It's easier to understand with direction both set.

scrollz is new to me. I think it works the same as scrollx except that it's for scrolling in z axis instead of x.
 
O Ilusionista & Bloodbane,

ScrollX allows you to precisely set the X scrolling limit within your panel area. Maximum X scroll area of a level is still limited by panels. You can set scrollX to whatever value you like, but OpenBOR will not allow you to scroll beyond the panel area.

ScrollZ enables vertical scrolling in response to player movement along the Y or Z axis, and controls how far. There's potential to make 3D scrolling stages, but the main use of this is to enable vertical scrolling when players jump. Unlike ScrollX, ScrollZ does allow you to go scroll beyond the panel area, so if you don't set up panels and layers to accommodate you can scroll yourself right out the visual design of a level. Also note that entities are still confined to the level's Z boundaries. That's a good thing, since it means you could set up large ScrollZ values for vertically oriented scrolling but still keep Z movement limited within a defined area.

HTH,
DC
 
Back
Top Bottom