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 → I need someone to make a cog for me.
I need someone to make a cog for me.
2001-11-13, 12:36 PM #1
In this cog, I need it so that when you activate a thing (a door to be exact) it plays a .key one time until you activate it again.

Thanks in advance.

------------------
Code:
   ====
  ~~o o
  _\ -/_
 /  \ / \
//|  | |\\
\\|  | | \\
 \\  | |  \\
  )====|   ')
  | || |
  (_)(_) 
  |_||_| 
  |_||_| 
  [_][__\       
Luke Skywalker

My first released 3do (I know it sucks, you don't hafta tell me, sheesh)
2001-11-13, 1:09 PM #2
Hmmm.

 


#11/2001 GBK
Symbols
Message Activated
Message Timer
Thing Door
Keyframe Key_to_play
Int Lock=0 Local
End
Code
Activated:
If((Getsenderref() == Door) && (Lock == 0)) {
Lock = 1;
Playkey(Door, Key_to_play, 1, 0x2c);
Settimer(Getkeylen(Key_to_play)); }
Stop;
Timer: Lock=0; Stop;
End


 

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


------------------
Success is the inverse relationship between effort, gain, and loss.

[This message has been edited by GBK (edited November 14, 2001).]
And when the moment is right, I'm gonna fly a kite.
2001-11-15, 2:34 PM #3
Thanks, I'll try it out later.

------------------
Code:
   ====
  ~~o o
  _\ -/_
 /  \ / \
//|  | |\\
\\|  | | \\
 \\  | |  \\
  )====|   ')
  | || |
  (_)(_) 
  |_||_| 
  |_||_| 
  [_][__\       
Luke Skywalker

My first released 3do (I know it sucks, you don't hafta tell me, sheesh)

↑ Up to the top!