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 assistance please.....
Cog assistance please.....
2001-10-21, 1:44 PM #1
Would somebody please make me a quick cog that when a switch is activated, its sets a certain floor (surface) to uncheck "Impassible" and set the Geo to 0 for a specified ammount of time, then return it to geo 4 and impassable when the time ends. I am making it for a bridge that i want people to walk across, but if they are cought on the bridge when the switch is activated, down they fall. You will get credit for it, and thanks in advance!
2001-10-22, 8:25 AM #2
Hmmmmmmmm...

Try this:

# 10/2001 GBK

Symbols
Message Startup
Message Activated
Surface Switch
Surface Floor
End
Code
Startup: Setwallcel(Switch, 0); Return;
Activated: If(Getsenderref() == Switch) {
If(Getwallcel(Switch) == 0) { Setsurfaceflags(Floor, 0x0); Setfacegeomode(Floor, 0x0);
Clearadjoinflags(Floor, 0x5); Setadjoinflags(Floor, 0x7); Setwallcel(Switch, 1); }
Else If(Getwallcel(Switch) == 1) { Setfacegeomode(Floor, 0x4); Setsurfaceflags(Floor, 0x5);
Clearadjoinflags(Floor, 0x7); Setadjoinflags(Floor, 0x5); Setwallcel(Switch, 0); } } Return;
End


It works. I tested it.

------------------
Success is the inverse relationship between effort, gain, and loss.
And when the moment is right, I'm gonna fly a kite.
2001-10-22, 11:30 AM #3
Thats kind of what i want, but what about sounds? And i want it to haev a timer, so after a ammount of time that i enter into the value box has passed, the flags return. Also it would be nice if i could change the sounds it makes. thanks!
2001-10-22, 6:17 PM #4
Who in thier right mind locks a sound? I surely dont!

Oh yeah, the cog...


-


# 10/2001 GBK
Symbols
Message Startup
Message Activated
Message Timer
Surface Switch
Surface Floor
Sound Open
Sound Closed
Flex Countdown
Flex Volume=1.0
Flex Mindist=-1
Flex Maxdist=1.0
End
Code
Startup: Setwallcel(Switch, 0); Return;
Activated: If(Getsenderref() == Switch) { If(Getwallcel(Switch) == 0) { Call Dissappear; } Else If(Getwallcel(Switch) == 1) { Call Appear; } } Return;
Appear: Setfacegeomode(Floor, 0x4); Setsurfaceflags(Floor, 0x5);
Clearadjoinflags(Floor, 0x7); Setadjoinflags(Floor, 0x5); Setwallcel(Switch, 0);
PlaySoundPos(Closed, Surfacecenter(Switch), Volume, Mindist, Maxdist, 0x100); Return;
Dissappear: Setsurfaceflags(Floor, 0x0); Setfacegeomode(Floor, 0x0);
Clearadjoinflags(Floor, 0x5); Setadjoinflags(Floor, 0x7); Setwallcel(Switch, 1);
PlaySoundPos(Open, Surfacecenter(Switch), Volume, Mindist, Maxdist, 0x100); Settimer(Countdown); Return;
Timer: Call Appear; Return;
End

-

Again, it works, I tested it.

The last few variables are for the sounds, mindist & maxdist are just that - the minimum and maximum distances for the sound.



------------------
Success is the inverse relationship between effort, gain, and loss.
And when the moment is right, I'm gonna fly a kite.
2001-10-26, 2:23 PM #5
umm... its nt working. Just does nothing when i activate the surface.
2001-10-26, 2:41 PM #6
Its not the cog - I tested it.

Its problably an installation error.



------------------
Success is the inverse relationship between effort, gain, and loss.
And when the moment is right, I'm gonna fly a kite.

↑ Up to the top!