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 → Whats wrong here?
Whats wrong here?
2002-02-16, 11:57 AM #1
Alittle while ago, I got a cog off this forum, but I've only been able to try it lately due to techinal difficulties. But, the thing is, it doesn't work. Could anyone please correct this cog for me, thats if it's even wrong at all. Thanks.


symbols

message killed

thing darkjedi0

thing darkjedi1

end

#================================================

code

killed:

If(Getthinghealth(Victem0) != 0 || Getthinghealth(Victem1) != 0) Stop;
JKendlevel(1);
Stop;
End
2002-02-16, 12:26 PM #2
Does this work:

symbols
message killed
thing darkjedi0
thing darkjedi1
end
#================================================
code
killed:
If(Getthinghealth(darkjedi0) != 0 && Getthinghealth(darkjedi1) != 0) Stop;
JKendlevel(1);
Stop;
End
Team Battle.
2002-02-16, 12:44 PM #3
Yeah, it was trying to use two variables that don't exist.
2002-02-16, 1:09 PM #4
Hmm, thats strange. I am practically the only cogger that actully uses 'Stop', and I dont remimber writing that cog.

 

BTW, you might want to add a 'Sleep(1);' between the conditional and the 'JKendlevel()'. Otherwise, the level will terminate emmedietly upon killing the second actor.


 

This makes me curious, who else uses 'Stop'? I would like to know.

------------------
Success is the inverse relationship between effort, gain, and loss.
And when the moment is right, I'm gonna fly a kite.
2002-02-16, 1:39 PM #5
Quote:
<font face="Verdana, Arial" size="2">Originally posted by GBK:
Hmm, thats strange. I am practically the only cogger that actully uses 'Stop', and I dont remimber writing that cog. 

This makes me curious, who else uses 'Stop'? I would like to know.

</font>


If I recall correctly Seifer has used stop; in a few cogs he's given me.



[This message has been edited by Hellcat (edited February 16, 2002).]
Team Battle.
2002-02-16, 3:28 PM #6
I meant religiously. Constantly. Although any usage might be considered.

 

Anyone else?

------------------
Success is the inverse relationship between effort, gain, and loss.
And when the moment is right, I'm gonna fly a kite.
2002-02-16, 7:15 PM #7
Does 'stop' stop the cog from functioning altogether? Or is it an alias for 'return'?
Dreams of a dreamer from afar to a fardreamer.
2002-02-17, 1:38 AM #8
Actully, 'Return' is an alias for 'Stop', as 'Stop' was used in the earliest LEC cogs. As far as I can tell, it does the exact same thing.

 

I am just curious as to if anyone else uses it as I do.

------------------
Success is the inverse relationship between effort, gain, and loss.
And when the moment is right, I'm gonna fly a kite.
2002-02-17, 5:03 AM #9
Thanks again.

GBK, I think you did write this cog, but it was a coupple of months ago.
2002-02-17, 5:36 AM #10
Oh, one more thing. How would I change the sleep time?
2002-02-17, 6:26 AM #11
Add Sleep(x); before jkEndLevel, where x is the time in seconds to wait before ending.
Dreams of a dreamer from afar to a fardreamer.
2002-02-18, 2:47 PM #12
The return; statement quits the block of code that the cog is running. Within a cog, like the door cogs, there can be a branch to another block of code, like "call movedoors;"
then the return; statement brings the cog back to the first block of code.

Maybe stop; is a bit different in stopping the cog entirely? (can't get to the JKSpecs currently to check.)


------------------
Sylvicolus JK homepage
If I have ever made any valuable discoveries, it has been owing more to
patient observation than to any other reason. -Isaac Newton
Sylvicolus JK homepage
If I have ever made any valuable discoveries, it has been owing more to
patient observation than to any other reason. -Isaac Newton
2002-02-18, 3:16 PM #13
Quote:
<font face="Verdana, Arial" size="2">Originally posted by Sylvicolus:
...stopping the cog entirely...</font>



I can safely say it does not. I have used 'Stop' exclusively for several monthes, in several hundered cogs, and I have found no problems in it preforming the job of 'Return'.


Very interestings, though, that I am practically the only cogger that uses this command. [http://forums.massassi.net/html/biggrin.gif]

(Mother always said I was special, but I dont think this is what she meant ...)

------------------
Success is the inverse relationship between effort, gain, and loss.
And when the moment is right, I'm gonna fly a kite.

↑ Up to the top!