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 → a cog with key press ?
a cog with key press ?
2001-12-07, 7:46 AM #1
Is it possible to use a keypress in a cog? I mean... i want to press a key and that the elev go to deck XX, bcaus my level has like 20 deck, to complicated to use switch !

i checked everywhere, nothing is talking about key.

------------------
"Fear is my ally."
-Darth Maul
Matrix TC rules JO !
2001-12-07, 8:24 AM #2
You mean like a hotkey? Sure, its possible, if not difficult. Using ingame buttons would be easier. Try this one for size:

Code:
# 11/2001 GBK
Symbols
Message Activated
Message Arrived
Thing Elevator
Flex Movespeed=4.0
Surface Switch0
Surface Switch1
Surface Switch2
Surface Switch3
Surface Switch4
Surface Switch5
Surface Switch6
Surface Switch7
Surface Switch8
Surface Switch9
Surface Switch10
Surface Switch11
Surface Switch12
Surface Switch13
Surface Switch14
Surface Switch15
Surface Switch16
Surface Switch17
Surface Switch18
Surface Switch19
Int Frame0
Int Frame1
Int Frame2
Int Frame3
Int Frame4
Int Frame5
Int Frame6
Int Frame7
Int Frame8
Int Frame9
Int Frame10
Int Frame11
Int Frame12
Int Frame13
Int Frame14
Int Frame15
Int Frame16
Int Frame17
Int Frame18
Int Frame19
Sound Beep
Int I=0						Local
Int I2=0						Local
End
Code
Activated:
If(Isthingmoving(Elevator) != 0) Stop;
For(I=0;I<=19;I=I+1) { 
If(Getsenderref() == Switch0) {
Movetoframe(Elevator, Frame0, Movespeed);
Playsoundpos(Beep, Surfacecenter(Switch0), 1.0, -1, 4, 0);
For(I2=0;I2<=19;I2=I2+1) { 
Setwallcel(Switch0[I2], 1); } } } 
Stop;
Arrived:
For(I=0;I<=19;I=I+1) { Setwallcel(Switch0, 0); }
Stop;
End





The good thing about this one is you can assign any switch/frame combanation you need, making it very easy to set up.


 


BTW, 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.
2001-12-07, 5:33 PM #3
thanks GBK
Matrix TC rules JO !

↑ Up to the top!