Some who were victim of my early Death Star phasers (is that mixing
metaphors?) were
wondering how it was done. In the interest of sparking iptscrae
development I
thought I would share the original code and see if anyone wants to
improve or
embellish the code.
Basically it is a matter of adding and removing a series of 7 different
props which
represent the phaser coming out of the Death Star (DS) and heading toward
a target
at (-70,-70), that is 70 pixels up and to the left of the current
position. Once
the phaser reaches the target a prop representing the explosion is
dropped at the
point of contact and a sound is played.
That's it. Hope you like it (and can refine it and/or add to it as well)
------------------ "fire phasers" 1.0
{
"Death Star" DONPROP
"phaser 1" DONPROP
"phaser 2" DONPROP "phaser 1" DOFFPROP
"phaser 3" DONPROP "phaser 2" DOFFPROP
"phaser 4" DONPROP "phaser 3" DOFFPROP
"phaser 5" DONPROP "phaser 4" DOFFPROP
"phaser 6" DONPROP "phaser 5" DOFFPROP
"phaser 7" DONPROP "phaser 6" DOFFPROP
"phaser burst" propstr =
propstr POSX 70 - POSY 70 - ADDLOOSEPROP
")boom" SAY
"phaser 7" DOFFPROP
} CHATSTR "fire phasers" SUBSTR IF
               (
geocities.com/siliconvalley/network/8524)                   (
geocities.com/siliconvalley/network)                   (
geocities.com/siliconvalley)