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 → Iam shure no-one has the time for this but...
Iam shure no-one has the time for this but...
2001-10-26, 2:13 PM #1
would it be possible to make a cog that when a object is killed (Like a Bad guy) then a door opens leading into a new room?

------------------
Project: MP CO-OP Level
----
"Consider this and you will find that i am right." - Jesus Christ
----------
"A fool finds no pleasure in understanding but delights in aring his own opinions."
----------
"Listen to advice and accept instruction,
and in the end you will be wise."
2001-10-26, 2:39 PM #2
Your right, I dont have the time. At least, oh well...

 

Symbols
Message Killed
Thing Victem
Thing Door
End
Code
Killed:
Movetoframe(Door, 1, 4);
Return;
End

 

Simple enough.



------------------
Success is the inverse relationship between effort, gain, and loss.
And when the moment is right, I'm gonna fly a kite.
2001-10-27, 6:28 PM #3
Hey- actually, i am in need of that kinda thing too, and (i know, im real picky about these things [http://forums.massassi.net/html/biggrin.gif] ) Can you make sounds for it? Like a sound for the thing to START moving, a second sound WHILE it is moving, and a finall sound for when it stops? And a small timer between when the thing is killed and teh thing starts moving. Heh sorry if i am nitpicky but imagine a door that moves all by itself with no noises etc [http://forums.massassi.net/html/smile.gif]
2001-10-28, 1:59 AM #4
Hmm, if its a plain-ole-regular JK door, it will make sounds anyway. Go aheah, try it... As for a timer,

 

Symbols
Message Killed
Thing Victem
Thing Door
Flex Sleptime=1.0
End
Code
Killed:
Sleep(Sleptime);
Movetoframe(Door, 1, 4);
Return;
End

 

In the symbols, 'Sleptime' is the flex for the timer...



------------------
Success is the inverse relationship between effort, gain, and loss.
And when the moment is right, I'm gonna fly a kite.
2001-10-29, 5:02 AM #5
GBK, wouldn't you need a getsender ref statement to see if the guy killed was the thing killed?!?!

Symbols
Message Killed
Thing Victim
Thing Door
sound door1
sound door2
Flex Sleptime=1.0
End
Code
Killed:
if(GetSenderRef() == Victim) {
Playsoundlocal(door1,80,0,0x0);
Sleep(Sleptime);
Playsoundlocal(door2,80,0,0x0);
Movetoframe(Door, 1, 4);
}
Return;
End

------------------
Cordially,
Lord Tiberius Grismath
Head Administrator
GCWC.net
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2001-10-29, 7:25 AM #6
you wouldn't necessarily need GetSenderRef() since the only other thing referenced in the code is the door (those damn doors are pretty hard to kill [http://forums.massassi.net/html/wink.gif]) but it is good practice to go ahead and put it in anyways.
2001-10-29, 7:33 AM #7
oh, also it would be GetSourceRef() not GetSenderRef()... sender would be the one who did the killing...
2001-10-29, 7:54 AM #8
Nope. Sender is the one who died and source should be the one who did the killing.

------------------
Thank you for sending me a copy of your book - I'll waste no time reading it.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2001-10-29, 11:33 AM #9
technically, source would be the actual projectile that did the killing, so you'd have to use parent to find the actual thing (player)

↑ Up to the top!