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 → Would Someone Please Make Me a Cog that Plays 3 Keys in Succession...
Would Someone Please Make Me a Cog that Plays 3 Keys in Succession...
2004-09-08, 6:46 PM #1
It's as simple as that. Just have the cog loop back to the first Key after it's completed the last in sequence. Thanks!
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2004-09-08, 6:56 PM #2
These are Keys for a character (Kyle to be specific) as well, so you also need to have a blank which designates which thing this will be playing keys for.
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2004-09-08, 7:20 PM #3
Code:
symbols
keyframe key0
keyframe key1
keyframe key2
thing kyle
int i=0 local
message startup

end

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

code
startup:
	sleep(1);
	while(1)
	{
		PlayKey(kyle, key0, 2, 0x2);
		Sleep(GetKeyLen(key0));
		i = i + 1;
		if(i > 2) i = 0;
	}

stop;
end

This should work. :)
May the mass times acceleration be with you.
2004-09-08, 7:38 PM #4
Thanks Slaw, but I seem to be having some problems.

My idea was to have a hologram rotating around in midair, playing the keys as it went, but the hologram is not reponding to the cog, and I'm not sure of how to get it to hover in midair(maybe put an invisible 3do underneath it?) and be unable to be affected by the player (such as bumping into it). What attributes should I assign it in the template creator? And why is it not responding to the cog?
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2004-09-08, 7:44 PM #5
Right, I changed it's parent template to "_ghoststructure" so at least now it doesn't have any collide problems and it's floating in midair. However, it still won't respond to the cog. Is this becasue it is no longer an ai? Before I had the parent template set to "_actor" although that wasn't working either.
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2004-09-09, 1:44 AM #6
Anyone?
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2004-09-09, 10:01 AM #7
Quote:
Originally posted by Daft_Vader
Anyone?
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2004-09-09, 2:34 PM #8
Quote:
Originally posted by Daft_Vader
Right, I changed it's parent template to "_ghoststructure" so at least now it doesn't have any collide problems and it's floating in midair. However, it still won't respond to the cog. Is this becasue it is no longer an ai? Before I had the parent template set to "_actor" although that wasn't working either.

NO! Go back to _actor for the base template. Add "collide=0" to the template, instead of setting it to _ghoststructure. Also, set its physics flags to 0x400000 (I'm guessing this will work -- the actor won't fall but I'm just not sure if explosions will move the hologram or something).
When you add the template into the level, in the thing editor, add the value "+thingflags" and make sure the 0x400 flag is set (send messages to associated cogs). If the cog still doesn't respond, well, I'm stumped. Actually, on second thought, that probably won't do anything because my cog doesn't rely on things sending messages to it... the only other thing I can think of is to make sure you have the right thing set in the cog window, and hit the "refresh" button.

[pre-submit edit] wait, you can probably just use the hologram template from PWP3 (slightly edited).
Code:
+hologram		none			orient=(0/0/0) type=actor typeflags=0x100100 collide=0 move=physics thingflags=0x20000400 model3d=ky.3do
May the mass times acceleration be with you.
2004-09-09, 3:22 PM #9
It's still not working. :(
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2004-09-09, 3:38 PM #10
Ok, I guess this has to be due to a template error on my part somewhere.

Here's what I've got:

Code:

# DESC: a display hologram
# BBOX: -.04 -.02 -.12 .04 .03 .06
hologramone       +hologram          size=.123778 movesize=.123778 model3d=ky.3DO collide=0 physflags=0x400000 puppet=ky.pup soundclass=ky.snd cog=kyle.cog
+hologram		none			 orient=(0/0/0) type=actor typeflags=0x100100 collide=0 move=physics thingflags=0x20000400 model3d=ky.3do


I've already tried lots of different combinations of these, but to no avail.


My cog window read such:


[http://img.photobucket.com/albums/v52/RossD/cogwindow.jpg]



And here's all in the world according to my item editor:


[http://img.photobucket.com/albums/v52/RossD/itemeditor.jpg]



So what's going on? :confused:
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2004-09-10, 2:43 PM #11
Okay, replace the previous hologram template with this one. It works -- I tested. At first, the holo didn't even appear when I loaded the level; thus I created it in the cog instead. But for some reason, it didn't play any of the keys until I added the puppet and soundclass, and then I didn't need to create the holo in the cog anyore. Wierd.
Code:
+hologram	none	orient=(0/0/0) type=actor typeflags=0x100100 collide=0 move=physics thingflags=0x20000400 size=.121817 movesize=.121817 model3d=ky.3do puppet=ky.pup soundclass=ky.snd

All I did was add a puppet, soundclass, and (move)size parameters, but I don't see how that would make a difference :confused:

*shrugs*

Oh well, it works, and so does the cog - that's all that matters :)
May the mass times acceleration be with you.

↑ Up to the top!