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 → need help..
need help..
2001-12-31, 5:08 PM #1
Yah, so I know I suck at cogs, but I still tried to make one myself where you kill 2 things and the level ends. My only problem is when one only one thing dies, the level ends....I know I'm missing something in my cog, but what?!?
2001-12-31, 8:55 PM #2
Ill show you the easiest way to do this. You decide what is wrong with your cog...


Code:
#01/2002 GBK
Symbols
Message Killed
Thing Victem0
Thing Victem1
End
Code
Killed:
If(Getthinghealth(Victem0) != 0 || Getthinghealth(Victem1) != 0) Stop;
JKendlevel(1);
Stop;
End



 

FTN:

Very basic stuff here. All we have is one message and 2 objects. The message is 'Killed', and the objects are the targets. If one of them is killed, then the script checks the health of bolth of them. If niether is alive, then it ends the level.

------------------
Success is the inverse relationship between effort, gain, and loss.
And when the moment is right, I'm gonna fly a kite.
2001-12-31, 9:14 PM #3
[edit]I could always be mixed up =0, if so sorry in advance![/edit]

[edit2]hehe, was wrong. Thanks for clearing that up GBK[edit2]

[This message has been edited by Hellcat (edited January 01, 2002).]

[This message has been edited by Hellcat (edited January 01, 2002).]
Team Battle.
2001-12-31, 10:01 PM #4
No, HC, your not reading it right. Its not checking for equality, its checking for INequality.


"If(Getthinghealth(Victem0) != 0 || Getthinghealth(Victem1) != 0) Stop;"

If one or the other is still alive, it STOPS. If BOLTH are DEAD, it continues.

------------------
Success is the inverse relationship between effort, gain, and loss.
And when the moment is right, I'm gonna fly a kite.
2002-01-01, 12:20 AM #5
Ok, I thought I must have done something wrong. The stop;'s were confusing me [http://forums.massassi.net/html/biggrin.gif]

I see's now. Thanks for clearing that up.
Team Battle.
2002-01-01, 5:13 AM #6
Thanks very much!!!! [http://forums.massassi.net/html/smile.gif]

↑ Up to the top!