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 → Cog help / maybe request
Cog help / maybe request
2003-11-16, 6:31 PM #1
I am very new to editing cogs, and not very good, and am trying to make a cog that would, when a switch is hit (1) start a key for a specific 3do in a level, and (2) Play a sound attachted to a 3do, and (3)cause a mission objective to be completed, and (4) after a delay, make a new mission objective come (one that makes the level end after a sector is entered), and would like to now how to go about this. Though to me it sounds complicated. Course that could be just because I new at this.

------------------
Hmmmmmmmm? Oh No WRONG BUTTON.....BBBOOOOMMM!!!
Hmmmmmmmm? Oh No WRONG BUTTON.....BBBOOOOMMM!!!
2003-11-17, 12:56 PM #2
as i dont have my fantastic cog wrieing programs like Parsec Cogpad and cogwriter and datamaster with me i can write the cog for you for a couple of days (i can when i get home then if you want!).
(all of whitch i think you should download. you can get cog writer at massassi and the cogpad topic on this forum has a link to cogpad... i dont have a link to Sabermasters site for datamaster..

now ill tell you step by step about the cog you want to write.. i'll try to make it simple but i may elaborate not as mutch as i'd like on some thigs


when a switch is hit

in the symbols section add a message. a message is something like when something is activated, killed damaged or stood on or in. In this case a "activated" message. also in the code section add a " Activated: ", that is the area that will be used when its activated. and done forget the " return; " after it on the next lineso you get something like this
Code:
symbols
message   activated
end
code
activated:
return;
end

(1) start a key for a specific 3do in a level

to do this you need to "define" the key(frame) in the symbols section and the 3do, so jedi knight knows what it is. then we are going to "playkey" the key.. so you get something like this
Code:
symbols
# a hash (the #) tells JK to ignore this like
# so i can make comments in this cog! wohoo
message activated
keyframe key1=key.key
#note that the key1 is what we will call the key in the cog
#and key.key is the keyframe file. if this is a level cog (and i think it is) then you can change it later in JED
thing  3do=my.3do
#work it out.
end
code
activated:
playkey(thing,key,3,0x0)
#........3do.key.prioatey.flags
#the prioatey is used for actors, ignore it for now.
#the flags are certain settings, in this case the 0x0 flag repeates
# 0x1 will make the key play one time..
return;
end


(2) Play a sound attachted to a 3do

first as before define the sound, then we paly it, but as its on a thing we will playsoundthing, playsoundlocal playes the sound on the player (best for SP and certain MP things) BUT playsoundglobal will play the sound on all computors i a MP game. so we get this..

Code:
symbols
message activated
thing 3do=my.3do
keyframe key=key.key
sound  duh=my.wav
end
code
activted:
playkey(3do,key,3,0x0);
#if you want a delay use sleep(2); (2 being time in seconds)
playsoundthing(3do,sound,1,1,35,0x1);
# .............3do..sound.volume.minrad.maxrad.flags
#minrad and max rad are the radius it fades from ad too.
#i may have got that in the wong order..
return;
end

(3)cause a mission objective to be completed
(4) after a delay, make a new mission objective come (one that makes the level end after a sector is entered)

this is slightly hard and i gotta go now, what i think you'd be better to do is download the GOAL! plugi from massassis plugin section and use it to make your goals and set them

------------------
I am pjb.
Another post......
another moment of my life wasted.....
at least i made a level.
PJB's JK page's

-the PJB jedi rule book-
rule one, "never trust a bartender with bad grammar"-kyle katarn in JO

Rule Two,  "Gravity is a crule misstress" -kyle katarn in MotS, and the alternatior MK I in AJTD

rule three, "asprines good, but it hasent got the kick of morphine. and its not gonna stop the hurting in my arm, the ones thats on the otherside of the room i mean" -the alternatior
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?

↑ Up to the top!