{"id":961,"date":"2023-03-13T12:04:44","date_gmt":"2023-03-13T17:04:44","guid":{"rendered":"https:\/\/chronocrash.com\/obor\/wiki\/?p=961"},"modified":"2023-12-27T23:45:38","modified_gmt":"2023-12-28T04:45:38","slug":"type","status":"publish","type":"post","link":"https:\/\/chronocrash.com\/obor\/wiki\/type\/","title":{"rendered":"Type"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Type identifies the intended purpose of a model. Newly spawned entities get a set of default behaviors and flags based on their type. Various Internal logic routines and legacy faction interactions are also based on type.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Types<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Type is a model level property used to set up an entity&#8217;s initial default behaviors and then act as a base category for the entity&#8217;s purpose. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Endlevel<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If this item is touched by a player, it adds its score value (if any) to the player&#8217;s score and the current stage ends immediately. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Enemy<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Computer controlled entities that oppose the players. Enemies are hostile toward players and attack on sight. If there is a group of enemies, the players must defeat them all to continue. By default, a level ends automatically if it has no enemies left to spawn (or has no enemies at all).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Item<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The entity is a stationary item which can be picked up by other entities. Items perform one of the following on the entity that picks them up, and also trigger a didhitscript to allow an endless variety of other effects. By default computer controlled entities with a GET animation will seek out and collect items if they can use them.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Add their score value to player&#8217;s score (players only).<\/li>\n\n\n\n<li>Add an extra life to player (players only).<\/li>\n\n\n\n<li>Add their health to collector&#8217;s health.<\/li>\n\n\n\n<li>Switch collector to a weapon model (see <a href=\"https:\/\/chronocrash.com\/obor\/wiki\/weapons\/\" data-type=\"post\" data-id=\"680\">Weapons<\/a>).<\/li>\n\n\n\n<li>Add ammo to a limited use weapon (see <a href=\"https:\/\/chronocrash.com\/obor\/wiki\/weapons\/\" data-type=\"post\" data-id=\"680\">Weapons<\/a>).<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">None<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Utility type entity. None types are &#8220;neutral&#8221; entities used for various purposes by legacy modules. In general you should avoid using this type as it is meant primary for objects that are fully out of play.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">NPC<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Computer controlled entities that do not count toward groups, waits, or level completion. By default NPCs are hostile toward players, but they are useful to create computer controlled allies.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Obstacle<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Stationary object. Obstacles are subject to damage and can drop items on death, but they are otherwise simple by design with no attack, movement, or falling. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Panel<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The entity will scroll together with level depending on its speedf setting. <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>1.0<\/code> = Playfield. <\/li>\n\n\n\n<li><code>0.5<\/code> = Native background.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">This type is useful to add animated scrolling levels to a level. Note that any entity type can be made to scroll with the level with the scroll property.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Player<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Players are the human controlled game objects. Players can attack and damage enemies, obstacles, and each other.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Projectile<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Entity type specialized for projectiles used by all other entity types.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Pshot<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Legacy type used for player projectiles. This type is maintained only for legacy compatibility and should not be used.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Steamer<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Legacy decorative object. It continuously spawns an entity with upward velocity (using the model name &#8220;Steam&#8221;) and alpha blending enabled.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Text<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Text entities are designed to act as pop-up text or graphics. While a text item is onscreen, all other entities freeze in place. Once its IDLE animation completes, the text entity <a href=\"https:\/\/chronocrash.com\/obor\/wiki\/killed-and-dead\/\" data-type=\"post\" data-id=\"283\">kills itself<\/a> and action continues. By default players may skip text with a button press (optionally disabled).  <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Trap<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Traps are similar to obstacles, but are able to attack other entities. Traps are hostile to both players and enemies. Entities hit by a trap&#8217;s attack cannot be hit by the same trap again unless the trap knocks them down or they take damage from a different entity.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Subtypes<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Subtypes add a second set of behaviors to the primary type. Add with types, it is important to note these are <strong>default<\/strong> behaviors. You can achieve much more nuanced effects by altering the specific properties that control behavior.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Arrow<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Arrows fly in a straight line across the screen until they are out of play or hit another entity.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Biker<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Bikers fly across the screen until just off sight, then reappear moving in the opposite direction from a random <a href=\"https:\/\/chronocrash.com\/obor\/wiki\/axis\/\" data-type=\"post\" data-id=\"59\">Z axis<\/a> position. They will continue this pattern indefinitely until hit by an attack. The biker will then attempt to spawn an entity with its rider property (default &#8220;K'&#8221;). The rider will appear using same palette as biker, falling, and damaged by the attack.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Both<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">For endlevel items. All active players must be touching the item to end a stage.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Chase<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Has a different effect depending on type:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Enemy &#8211; The enemy pursues entities it is hostile toward directly as possible. It will never sidestep or backpedal unless trying to get around an obstruction. If the entity has a run animation and run properties set, it will run to catch up to targets that are far away. Note NPC types use this behavior by default.<\/li>\n\n\n\n<li>Projectiles &#8211; Entities thrown as a projectile will home in on targets along the <a href=\"https:\/\/chronocrash.com\/obor\/wiki\/axis\/\" data-type=\"post\" data-id=\"59\">X and Z axis<\/a>. <\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Flydie<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Obstacles fly off the screen playing their fall animation when destroyed.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Follow<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">NPCs attempt to follow their parent entity (if any) entity that spawned or summoned it. Uses range setting in <em>idle<\/em> animation to determine how close it will follow. If the npc exceeds the minimum range and no entities it is hostile towards are nearby, it will move to the spawning entity normally. If it exceeds maximum range, the npc will warp to the parent entity instantly and play its respawn animation if available. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Noskip<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Disables the player skipping text entities with a button press.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Notgrab<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The entity cannot be grabbed by others.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Project<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Similar to a weapon, but only changes a property called project on the collecting entity. See <a href=\"https:\/\/chronocrash.com\/obor\/wiki\/weapons\/\" data-type=\"post\" data-id=\"680\">Weapons<\/a> for details.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Touch<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Item types are collectable by touch alone.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Weapon<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The item is a weapon pickup. See <a href=\"https:\/\/chronocrash.com\/obor\/wiki\/weapons\/\" data-type=\"post\" data-id=\"680\">Weapons<\/a> for details.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Script<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Both type and subtype are accessible as a model property. Both employ bitmask constants, and it is therefore possible to evaluate for more than one type at once in script. You can also assign more than one type to an entity, although this may cause undefined behavior.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Type<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>openborcosntant(\"TYPE_UNDELCARED\")<\/code> &#8211; No type at all. <\/li>\n\n\n\n<li><code>openborcosntant(\"TYPE_NONE\")<\/code><\/li>\n\n\n\n<li><code>openborcosntant(\"TYPE_NO_COPY\")<\/code> &#8211; Don&#8217;t copy type data to\/from another model.<\/li>\n\n\n\n<li><code>openborcosntant(\"TYPE_PLAYER\")<\/code><\/li>\n\n\n\n<li><code>openborcosntant(\"TYPE_ENEMY\")<\/code><\/li>\n\n\n\n<li><code>openborcosntant(\"TYPE_ITEM\")<\/code><\/li>\n\n\n\n<li><code>openborcosntant(\"TYPE_OBSTACLE\")<\/code><\/li>\n\n\n\n<li><code>openborcosntant(\"TYPE_PROJECTILE\")<\/code><\/li>\n\n\n\n<li><code>openborcosntant(\"TYPE_STEAMER\")<\/code><\/li>\n\n\n\n<li><code>openborcosntant(\"TYPE_SHOT\")<\/code><\/li>\n\n\n\n<li><code>openborcosntant(\"TYPE_TRAP\")<\/code><\/li>\n\n\n\n<li><code>openborcosntant(\"TYPE_TEXTBOX\")<\/code><\/li>\n\n\n\n<li><code>openborcosntant(\"TYPE_ENDLEVEL\")<\/code><\/li>\n\n\n\n<li><code>openborcosntant(\"TYPE_NPC\")<\/code><\/li>\n\n\n\n<li><code>openborcosntant(\"TYPE_PANEL\")<\/code><\/li>\n\n\n\n<li><code>openborcosntant(\"TYPE_ANY\")<\/code> &#8211; Combines all the following masks: TYPE_NONE, PLAYER, TYPE_ENEMY, TYPE_ITEM, TYPE_OBSTACLE, TYPE_PROJECTILE, TYPE_STEAMER, TYPE_SHOT, TYPE_TRAP, TYPE_TEXTBOX, TYPE_ENDLEVEL, TYPE_NPC, TYPE_PANEL<\/li>\n\n\n\n<li><code>openborcosntant(\"TYPE_NO_CHECK\")<\/code> &#8211; Combines bitmasks to ignore in logic checks.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Subtype<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>openborconstant(\"SUBTYPE_NONE\")<\/code> &#8211; No subtype at all.<\/li>\n\n\n\n<li><code>openborconstant(\"SUBTYPE_BIKER\")<\/code><\/li>\n\n\n\n<li><code>openborconstant(\"SUBTYPE_NOTGRAB\")<\/code><\/li>\n\n\n\n<li><code>openborconstant(\"SUBTYPE_ARROW\")<\/code><\/li>\n\n\n\n<li><code>openborconstant(\"SUBTYPE_TOUCH\")<\/code><\/li>\n\n\n\n<li><code>openborconstant(\"SUBTYPE_WEAPON\")<\/code><\/li>\n\n\n\n<li><code>openborconstant(\"SUBTYPE_NOSKIP\")<\/code><\/li>\n\n\n\n<li><code>openborconstant(\"SUBTYPE_FLYDIE\")<\/code><\/li>\n\n\n\n<li><code>openborconstant(\"SUBTYPE_BOTH\")<\/code><\/li>\n\n\n\n<li><code>openborconstant(\"SUBTYPE_PROJECTILE\")<\/code><\/li>\n\n\n\n<li><code>openborconstant(\"SUBTYPE_FOLLOW\")<\/code><\/li>\n\n\n\n<li><code>openborconstant(\"SUBTYPE_CHASE\")<\/code><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Basic type and behavior templates.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[30,328],"tags":[432,433,434,435,420,421,436,437,422,423,438,439,424,425,426,427,440,428,429,430,441,431,442],"class_list":["post-961","post","type-post","status-publish","format-standard","hentry","category-game-mechanics","category-openbor","tag-arrow-subtype","tag-biker-subtype","tag-both-subtype","tag-chase-subtype","tag-endlevel-type","tag-enemy-type","tag-flydie-subtype","tag-follow-subtype","tag-item-type","tag-none-type","tag-noskip-subtype","tag-notgrab-subtype","tag-npc-type","tag-obstacle-type","tag-panel-type","tag-player-type","tag-project-subtype","tag-projectile-type","tag-pshot-type","tag-text-type","tag-touch-subtype","tag-trap-type","tag-weapon-subtype"],"revision_note":"","jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/chronocrash.com\/obor\/wiki\/wp-json\/wp\/v2\/posts\/961","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chronocrash.com\/obor\/wiki\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chronocrash.com\/obor\/wiki\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chronocrash.com\/obor\/wiki\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chronocrash.com\/obor\/wiki\/wp-json\/wp\/v2\/comments?post=961"}],"version-history":[{"count":2,"href":"https:\/\/chronocrash.com\/obor\/wiki\/wp-json\/wp\/v2\/posts\/961\/revisions"}],"predecessor-version":[{"id":964,"href":"https:\/\/chronocrash.com\/obor\/wiki\/wp-json\/wp\/v2\/posts\/961\/revisions\/964"}],"wp:attachment":[{"href":"https:\/\/chronocrash.com\/obor\/wiki\/wp-json\/wp\/v2\/media?parent=961"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chronocrash.com\/obor\/wiki\/wp-json\/wp\/v2\/categories?post=961"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chronocrash.com\/obor\/wiki\/wp-json\/wp\/v2\/tags?post=961"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}