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 → Looping...
Looping...
2001-08-08, 8:07 AM #1
How would i make the following cog start again straight after it has finished?

Code:
# Jedi Knight Cog Script
#
# moveframe.cog
#
#
# This will make a thing follow a specified path using frames.
#
# [EL3CTRO - 08/08/2001]
#
#(/\/\/\/\(()============================================================-
symbols

message startup

thing light

int movespeed=2
int waittime=10

end
#(/\/\/\/\(()============================================================-

code
# ....................
startup:


MoveToFrame(light, 1, movespeed);

WaitForStop(light);

MoveToFrame(light, 0, movespeed);

WaitForStop(light);


return;

end


------------------
Generating Electro Vibes™ for the masses on Massassi
Go To: EL3CTROPROSE or DEEPMATRIX
Boba Jules: You ever read the bible TK-421?
TK-421: No?
Boba Jules: Oh, ok...
*BLAM BLAM BLAM BLAM*
Generating Electro Vibes™ for the masses on Massassi
Go To: BiTsToRm Forums or L3CY's Topsites
Boba Jules: You ever read the bible TK-421?
TK-421: No?
Boba Jules: Oh, ok...
*BLAM BLAM BLAM BLAM*
<EL3CTRO> EXCAUSE ME MISTAR CAERV BUT I LIEK MY PHORUMPHS!
2001-08-08, 8:12 AM #2
Hrm..... you'd think the "return" would have done it.....
In my mind I can see your face, as Your love pours down in a shower of grace. Some people tell me that Your just a dream, but my faith is the evidence of things unseen.

Once upon a time God spoke to me, and then I was never the same again.

_-=MaTRiX=-_
2001-08-08, 8:14 AM #3
I wish it were that simple
Generating Electro Vibes™ for the masses on Massassi
Go To: BiTsToRm Forums or L3CY's Topsites
Boba Jules: You ever read the bible TK-421?
TK-421: No?
Boba Jules: Oh, ok...
*BLAM BLAM BLAM BLAM*
<EL3CTRO> EXCAUSE ME MISTAR CAERV BUT I LIEK MY PHORUMPHS!
2001-08-08, 11:14 AM #4
Use a timer, I'd think...

For instance:

startup:
SetTimer(whatever);

timer:
Do whatever

If you just sync the timer with the thing's movement, it should work out alright...

[Ah, wait. You can use the arrived message, I believe. Be easier probably.]

[This message has been edited by Cguy (edited August 08, 2001).]
Massassi, delivering a million smiles a day. Well...almost. ;-)
2001-08-08, 1:18 PM #5
Code:
# Jedi Knight Cog Script
#
# moveframe.cog
#
#
# This will make a thing follow a specified path using frames.
#
# [EL3CTRO - 08/08/2001]
#
# Modified 08/08/2001 by Aglar to loop
#
#(/\/\/\/\(()============================================================-
symbols

message startup
message content

thing light

int movespeed=2
int waittime=10

end
#(/\/\/\/\(()============================================================-

code
# ....................
startup:

call content;

return;

content:

MoveToFrame(light, 1, movespeed);

WaitForStop(light);

MoveToFrame(light, 0, movespeed);

WaitForStop(light);

call content;

return;

end


That should work, I see no reason why it wouldn't. Of course, I've never tried to make a message call itself. Try it and see.

↑ Up to the top!