Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → much like 00_std_elev.cog cept it doesn't work
much like 00_std_elev.cog cept it doesn't work
2001-07-23, 12:29 PM #1
I am building a camera wire cog that when you activate a console it will flash to a camera and then the camera will run between to frames on a 'wire'. it will go to the first frame and works fine, when i activate the console again it stays at frame 1 instead of already moved back to frame 0 and begin moving to frame 1. complicated...not really i hope either its this or my frames are messed up which i am doubting:

# Jedi Knight Cog Script
#
# 00_CameraWire.cog
#
# A cog that allows you to put a camera on a 'moving wire'
#
# [Silent]
#
# (C)shi7 LucasArts does not support yadda yadda yamama

symbols

message activated
message timer

thing console
thing camera

float start_wait=0.00
float sleeptime=2.0
float speed=4.0
end

#Code _______
#Start []D []-[] []

code
activated:
//if (phuck != 1) return;
if (IsThingMoving(camera)) return;
if (GetCurFrame(camera) != 0) return;

Sleep(start_wait);

MoveToFrame(camera, 1, speed);
Sleep(start_wait);
if (GetCurFrame(camera) == 0) return;
SetTimer(speed);
return;

timer:
// Sleep(speed);
MoveToFrame(camera, 0, speed);
//phuck==0
return;

end

2001-07-23, 2:24 PM #2
I didn't have much time to concentrate on this because my brother won't leave so I can think. but maybe its moving the camera towards point 0, and point 1 at the same speed and time, thus canceling out movement. I'm not sure.
2001-07-23, 11:27 PM #3
I'm not sure that I understand what you're trying to say. Please rephrase the problem. Are you saying you want it to move back from one frame to the other when you activate it?

BTW-lose the ph**k in the code. It's childish and offensive.

-Tazz
-There are easier things in life than finding a good woman, like nailing Jello to a tree, for instance

Tazz
2001-07-24, 10:19 AM #4
hey sorry tazz, i wont do it again... anyway, i meant that it will work properly when activated, it will move from frame 0 to frame 1 and then you cant view the camera anymore (because of a delay), then you get teleported but thats a sector cog, anyhow, you come back and activate the console again and it STAYS at frame 1 instead of what it was supposed to do. After the first activation the camera should have come back to frame 0.. however it simply stays at frame 1, thus when you activate the 2nd time... it is already at frame 1 and doesnt do anything but return; see if that helps Thanks!

-Silent
2001-07-24, 1:37 PM #5
Try loosing the timer, and simply doing:

...
MoveToFrame(camera, 1, speed);
Sleep(speed);
MoveToFrame(camera, 0, speed);
...
Bassoon, n. A brazen instrument into which a fool blows out his brains.

↑ Up to the top!