{"id":1735,"date":"2016-07-24T18:33:32","date_gmt":"2016-07-24T18:33:32","guid":{"rendered":"http:\/\/www.lukas-kalinowski.com\/Homepage\/?page_id=1735"},"modified":"2016-09-22T18:41:56","modified_gmt":"2016-09-22T18:41:56","slug":"physicsexplosioncomponent","status":"publish","type":"page","link":"http:\/\/www.lukas-kalinowski.com\/Homepage\/ogrebasearchitecture\/physicsexplosioncomponent\/","title":{"rendered":"PhysicsExplosionComponent"},"content":{"rendered":"<h2><span style=\"color: #3282cd;\">(NativeObjectWorldArchitecture) NOWA-Engine<\/span><\/h2>\n<h3><span style=\"color: #3282cd;\">Chapter: PhyicsExplosionComponent<\/span><\/h3>\n<p>This component is used to simulate an explosion within a given range, so that affected physics active game objects will be thrown away. It can be appended e.g. below a physics active or artifact component. Appending under a physics active one, may simulate e.g. that an enemy or the player throws an dynamite. The component comes with the following properties:<\/p>\n<ul>\n<li><strong>ExplosionAffectedCategories:<\/strong> The affected categories, that will be handled when in range of an explosion. Its possible to exclude certain categories. A [+] prefix following by the category name adds those category to the type mask and a [-] substracts it from a specifed category name. The category name &#8218;ALL&#8216; has a special meaning. It enables all categories. Example:\n<ul>\n<li>generateCategoryId(&#8222;+All-House-Floor&#8220;) generates an id, with which all objects but houses and floors are for example affected.<\/li>\n<li>generateCategoryId(&#8222;+Player+Enemy&#8220;) whould mark Players and Enemies to be selected<\/li>\n<\/ul>\n<\/li>\n<li><strong>Activate [true|false]<\/strong>: True means game object will detonate automatically controlled by the explosition timer. False means the explosion has not been activated yet.<\/li>\n<li><strong>CountDown[0|+]:<\/strong> The explosition count down in seconds at which the game object will detonate.<\/li>\n<li><strong>Radius   [0|+]:<\/strong> The radius in meters, which detemines the other game objects that are in range, which get an impulse applied by the given strength.<\/li>\n<li><strong>Strength [0|+]:<\/strong> The maximum explosion strength in newton meters. Note, the more a game object away from the detonation, the weaker the detonation for the game object.<\/li>\n<li><strong>ExplosionCallbackScriptFile:<\/strong> Optional lua script file name to execute when the explosion occured. In this callback a list with the affected game object will be delivered.<\/li>\n<\/ul>\n<p>Example lua script file to play a sound each second and when the detonation occurs play an explosion particle effect and explosion sound:<\/p>\n<p><code><br \/>\n<span style=\"color: #003366;\">function<\/span> onTimerSecondTick(originGameObject)<br \/>\n&emsp;soundComponent = originGameObject:getSimpleSoundComponent();<br \/>\n&emsp;soundComponent:setActivated('Timer', true);<br \/>\n<span style=\"color: #003366;\">end<\/span><\/p>\n<p><span style=\"color: #003366;\"> function <\/span>onExplode(originGameObject)<br \/>\n&emsp;soundComponent = originGameObject:getSimpleSoundComponent();<br \/>\n&emsp;soundComponent:setActivated('Explosion', true);<br \/>\n&emsp;particleComponent = originGameObject:getParticleUniverseComponent();<br \/>\n&emsp;particleComponent:setActivated(particleComponent:getFirstParticleName(), true);<br \/>\n<span style=\"color: #003366;\">end<\/span><\/p>\n<p><span style=\"color: #003366;\"> function<\/span> onExplodeAffectedGameObject(originGameObject, affectedGameObject, distanceToBomb, detonationStrength)<\/p>\n<p><span style=\"color: #003366;\"> end<\/span><br \/>\n<\/code><\/p>\n<p>Example:<\/p>\n<p\/>\n<iframe loading=\"lazy\" width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/hL8XLhigy7g\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>(NativeObjectWorldArchitecture) NOWA-Engine Chapter: PhyicsExplosionComponent This component is used to simulate an explosion within a given range, so that affected physics active game objects will be thrown away. It can be appended e.g. below a physics active or artifact component. Appending &hellip; <a href=\"http:\/\/www.lukas-kalinowski.com\/Homepage\/ogrebasearchitecture\/physicsexplosioncomponent\/\">Weiterlesen <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1631,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"onecolumn-page.php","meta":{"ngg_post_thumbnail":0,"footnotes":""},"class_list":["post-1735","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/www.lukas-kalinowski.com\/Homepage\/wp-json\/wp\/v2\/pages\/1735","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.lukas-kalinowski.com\/Homepage\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.lukas-kalinowski.com\/Homepage\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.lukas-kalinowski.com\/Homepage\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.lukas-kalinowski.com\/Homepage\/wp-json\/wp\/v2\/comments?post=1735"}],"version-history":[{"count":10,"href":"http:\/\/www.lukas-kalinowski.com\/Homepage\/wp-json\/wp\/v2\/pages\/1735\/revisions"}],"predecessor-version":[{"id":1765,"href":"http:\/\/www.lukas-kalinowski.com\/Homepage\/wp-json\/wp\/v2\/pages\/1735\/revisions\/1765"}],"up":[{"embeddable":true,"href":"http:\/\/www.lukas-kalinowski.com\/Homepage\/wp-json\/wp\/v2\/pages\/1631"}],"wp:attachment":[{"href":"http:\/\/www.lukas-kalinowski.com\/Homepage\/wp-json\/wp\/v2\/media?parent=1735"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}