Hi, im making a game that's in the style of robotron if anyone has played it... and have been working on it for alittle while now.. (JUST started to use dark basic) and have it set up so its mouse aim and a wierd movement(arrow keys"will switch to wasd soon"), but what im really wondering is how would I go about making a bullet trail or laser effect " a line to the distance sortof thing"? I have a limb set up for the distance and collision detection (im going to use limb intersect) and want it so its mouseclick like if mouseclick then draw the line from the player to the limb object... sorry if this is confusing, im guessing it has something to do with the particles system but I have no idea... how to use that... and the line command is only x ,y plane?
Im going to attach the source code though oh and if anyone wants to use it they can... not much of anything though wouldnt see why..
Rem Project: RoboTron
Rem Created: 11/6/2006 12:18:01 AM
Rem ***** Main Source File *****
gosub media
media:
`=========[MEDIA]==========
player = 1 `player number
bullet = 100 `bullet number
gunDis# = 50 `the distance for the limb
make object sphere bullet,1 `make the object for the limb
position object bullet,0,10,0 `fixate the bullet object
make mesh from object 1,bullet `make a mesh out of the bullet
delete object bullet `delete the bullet object for speed
make object sphere player,5:color object player,rgb(0,255,0) `make
`and color the sphere object
position object player,0,0,0 `fix the player position
add limb player,1,1 ` make the bullet limb
make matrix 1,1000,1000,5,5 ` make the tempory floor
do
X#= object position x(player) `\
Y#= object position y(player)
Z#= object position z(player)
AX#= object angle x(player)
AY#= object angle y(player)
AZ#= object angle z(player)
BX# = limb offset x(player,1)
BY# = limb offset y(player,1)
BZ# = limb offset z(player,1)
OFFSET LIMB player,1,0,0,-gunDis# `fix the limb to the player
`====[Player Control]=====
if upkey()=1 then move object player,-.2
if downkey()=1 then move object player,.2
if leftkey()=1 then move object left player,.2
if rightkey()=1 then move object right player,.2
`====[Camera control====
posx#=cos(270-a#) * 30 + object position x(1)
posz#=sin(270-a#) * 30 + object position z(1)
Position Camera posx#,object position y(1)+120,posz#
Point Camera object position x(1),object position y(1)-120,object position z(1)+40
point#=atanfull(mousex()-object screen x(player),mousey()-object screen y(player))
yrotate object player,-point#
loop
~Ellusion Games~
xXxLife is like a box of chocalate's there's always one's you dont likexXx