hey.... I have seen that code somewhere before
anyways, first things first
take the ' marks out from in front of the three lines before the sync. The ' mark signifies a comment, which is ignored when the code is run
once the ' marks are taken out, when the spacekey is let go, you will see the cone move away from the camera (i.e. "move object 1,5" will move the cone 5 units in the positive 'z' direction every loop)
I am guessing you want the cone to move in the direction the cone is pointing? In this case, we need to determine the movement angle at the time of firing. This is what Van B was getting at in your other
post .
try something like this instead:
make object cone 1,2
position object 1, x, y, z
scale object 1, 50, 100, 50
make camera 1
position camera 1, x, y, z-20
point camera 1, x,y,z
sync on
sync rate 60
do
text 1, 1, str$(ang#)
if spacekey()=1 and cycling = 0 then cycling = 1
if spacekey()=0 and cycling = 1
firing = 1
cycling = 0
sx#=-sin(object angle z(1))
sy#=cos(object angle z(1))
endif
if cycling = 1
cycle=wrapvalue(cycle+1)
ang#=135*sin(cycle)
zrotate object 1,ang#
endif
if firing = 1
xpos#=object position x(1)+sx#
ypos#=object position y(1)+sy#
position object 1, xpos#, ypos#, object position z(1)
endif
sync
loop
This is not the Sig you are looking for....