Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Version 1 and Version 2 of code/doc/PartDestructionEvent


Ignore:
Timestamp:
May 22, 2014, 3:27:23 PM (10 years ago)
Author:
noep
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • code/doc/PartDestructionEvent

    v1 v2  
    6262== Example ==
    6363
    64 Look at the [http://www.orxonox.net/browser/code/branches/presentationFS14/data/levels/templates/HeavyCruiser.oxt#L3 HeavyCruiser.oxt] template to see an implementation of this!
     64Here's a few examples of !PartDestructionEvents.
     65
     66[[br]]
     67
     68{{{
     69<PartDestructionEvent targetType="ship" targetParam="boostpowerrate" operation="-" value="0.5" message="One of your ship's generators was destroyed!"/>
     70}}}
     71''Description:'' Reduces the ship's boost-recharging-rate by 0.5 and shows a message in chat.
     72
     73[[br]]
     74
     75{{{
     76<PartDestructionEvent targetType="engine" targetName="bodyengine" targetParam="boostfactor" operation="set" value="1"/>
     77}}}
     78''Description:'' Sets the booststrength of the engine named "bodyengine" to 1 (= no boost).
     79
     80[[br]]
     81
     82{{{
     83<PartDestructionEvent targetType="part" targetName="sidearmLfront" operation="destroy"/>
     84}}}
     85''Description:'' Destroys the ShipPart named "sidearmLfront".
     86
     87[[br]]
     88
     89
     90Look at the [http://www.orxonox.net/browser/code/branches/presentationFS14/data/levels/templates/HeavyCruiser.oxt#L3 HeavyCruiser.oxt] template to see a working implementation of this!
    6591
    6692[[br]]