This is the Blaster script that I quickly made for my Stormtrooper
costume for the
Haloween Party. It uses the new functions of 1.0b4 for painting and
mouse position.
I know many others have created similar effects and could easily improve
this
script. But, hey, they haven't posted them so here goes . . . .
p.s. This would be in the OUTCHAT handler of the Cyborg.ipx script.
-------- Blast v0.b1
{
; I moved the pen to front so the beam would come out of my blaster and not
; appear behind me, and would cross over anyone else in the room. The beam
; color is Red, the size is 2, I set the beam starting point an (-5,-13)
from
; my character's position (approx where the blaster is on the outfit) and the
; beams ending point at the mouse position (nice aiming feature). I draw
the line
; and then immediately erase it. This maintains other painting on the
screen and
; gives a nice flicker effect.
PENFRONT
255 0 0 PENCOLOR
2 PENSIZE
POSX 5 - POSY 13 -
MOUSEPOS
LINE
PAINTUNDO
; I wanted to have the beam happen more than once with some different
; So this loop just shoots 10 times down the vertical axis of the MOUSEPOS
; This could probably be removed or modified - even I don't like it.
{
i ++
POSX 5 - POSY 13 -
MOUSEPOS 100 - i 20 * +
LINE
PAINTUNDO
} { i 10 < } WHILE
; Next we need a sound effect and a visual effect. The sound effect was
; Boom and the visual effect was a cloud burst called Fire which I got
; somewhere. The effect is a bit off center from the beam as written
; it should really be placed at (-7,-5) or so from the mousepos to be
; centered. The final line removes the word "blast" from the CHATSTR
; so it doesn't appear as a balloon.
")boom" SAY
"Fire" MOUSEPOS ADDLOOSEPROP
"" CHATSTR =
} CHATSTR "blast" SUBSTR IF
--------
As you make improvements and/or enhancements - please add them to the
newsgroup.
More later, Bruce
               (
geocities.com/siliconvalley/network/8524)                   (
geocities.com/siliconvalley/network)                   (
geocities.com/siliconvalley)