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 → print cog
print cog
2002-08-13, 5:16 PM #1
i made a cog so that when you activate a person, it prints a message, like ur talking to them. i was wondering, what do i do to make the cog so that it will play more than once, because you can only activate them, and see the message once. and i was wondering, is there anyway to put more than one print message into a cog? say so that you activate a person, and they say one thing, and you activate them again, and they say another thing?

------------------
Watch the Skies.
2002-08-14, 3:29 AM #2
Post the cog. I'll do this one.

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2002-08-14, 5:52 AM #3
Just throw in an index variable. For the sake of tradition, lets call it "I".

Code:
Symbols
#...
Int I=0    Local
End


Now, everytime the actor is activated, check for the value of that variable. After the printing is done, up the variable.

Code:
Activated:
If(I=0)  {
Print("this");
I=1; }

Else If(I=1) {
Print("that");
I=2; }

//..  And so on...



Any questions?

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-08-14, 10:25 AM #4
You'll need the == operator for those conditions. Ex: If(I=0) to If(I==0).

I often make that mistake after programming in Pascal. [http://forums.massassi.net/html/tongue.gif]

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-08-15, 3:26 AM #5
I was thinking what GBK was saying. Can't think striaght in some mornings. [http://forums.massassi.net/html/wink.gif]

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2002-08-15, 4:48 AM #6
[http://forums.massassi.net/html/eek.gif] NOOOOO! How could I make that mistake! NOOOOOO!

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.

↑ Up to the top!