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 → cogs
cogs
2001-12-20, 5:56 PM #1
I need 2 cogs, and one i think is kind of simple.

(1.)a cog that when you press a button a printed line of text appers

(2.)(If i don't get this cog from GBK in the mail first), a cog that plays a cutsceene when the level starts and goes off when it ends. When the level starts i want a printed line of text then a blackout, with the sound of kyle dying.

I need #2 first cuz i need to see if the ghost is in the right position.
The Brick has spoken!
2001-12-21, 4:55 AM #2
Ill get that cutscene cog to you in a bit.


Code:
#12/2001 GBK
Symbols
Message Activate
Surface Switch
Sound Beep
Int Only_once=0      #Allow activation only once?  0 = no.
Int Play_sound=0      #Play sound?  0 = no.
Int UNI_num=201      #UNI string number.
Int Lock=0     Local
End
Code
Activate:
If(Only_once == 0 && Lock == 1) Stop;
Lock = 1;
JKPrintunistring(JKgetlocalplayer(), UNI_num);
If(Play_Sound != 0) {
Playsoundglocal(Beep, 1.0, 0.0, 0); }
Setwallcel(Switch, 1); Sleep(0.5);
Setwallcel(Switch, 0); Stop;
End


I dont know if it works, I just typed it into the box. But it should... [http://forums.massassi.net/html/biggrin.gif]


 

To set the UNI string:


Hit F8 to bring up the episode editor.

Click on 'Edit strings'.

Type 'COG_201' into the 'Key' box.

Type the message you want to appear into the 'String' box.

Click on 'Add/Update'.

Close the strings editor, and save the episode.



If you used a different number, other than 201, update it accordingly into the 'UNI_num' variable.

------------------
Success is the inverse relationship between effort, gain, and loss.
And when the moment is right, I'm gonna fly a kite.
2001-12-21, 10:02 AM #3
I should've said, I need them to be simple, very simple.
The Brick has spoken!
2001-12-21, 10:03 AM #4
But then again, I should've read further.
The Brick has spoken!
2001-12-21, 2:25 PM #5
Here is that cutscene.

Code:
# 11/2001 GBK
Symbols
Message Startup
Flex Sleeptime=1
Int UNI_num=10101	#UNI string number.
Sound Kyle_die=kylgnb.wav	#'Sound of Kyle dying'...
Int I=0		Local
Thing Player		Local
End
Code
Startup:
Sleep(1.0);
Player = JKgetlocalplayer();
JKprintunistring(Player, UNI_num);
Setactorflags(Player, 0x400000);
Playsoundlocal(Kyle_die, 1.0, 0.0, 0);
Sleep(Sleeptime);
JKendlevel(1);
Stop;
End


It works, I tested it. [http://forums.massassi.net/html/biggrin.gif]

------------------
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!