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 → Simple cog needed, anyone willing to help?
Simple cog needed, anyone willing to help?
2003-05-29, 8:12 AM #1
I need a good swinging door cog. I want the door to swing open when clicked on or activated, NOT by a switch. I want the door to stay open until activated again, then it will close. Can someone help me out? Please?

------------------
"Everyone Dies..."
-Fett

My Website
Brad's Highschool Level
Unfinished Levels For Download
"Everyone Dies..."
-Fett

My Website
Brad's Highschool Level
Unfinished Levels For Download
2003-05-29, 9:42 AM #2
this cog will do it:
Code:
#=====
# Written By DSLS_DeathSythe (5/29/03)
# RotateDoor01.COG
# -Makes a door rotate to open.
# -does not close the door until it is activated again.
#=====
symbols
#-----
message   activated
message   arrived
thing     door=-1
flex      moveTime=1.0
int       door_pos=0     local
int       is_moving=0     local
#-----
end
#=====
code
#-----
activated:
  if(is_moving == 1) return;
  if(GetSenderRef() != door) return;
  is_moving = 1;
  if(door_pos == 0)
    RotatePivot(door, 1, moveTime);
  else
    RotatePivot(door, 1, -moveTime);
return;
#-----
arrived:
  is_moving = 0;
  if(door_pos == 0)
    door_pos = 1;
  else
    door_pos = 0;
return;
#=====
end

it works for JK but i dont think it works for MotS.
the cog is simple but setting up everything for it is a little hard to explain.

moveTime is how long the door takes to open.

the setup of the frames for the door is the same as the tutorial for RotatingDoors here at massassi.
look at the tutorial and see if you can get it to work, if not says so and ill try to explain it.

------------------
Famous last words - "It seemed like a good idea at the time."

[This message has been edited by DSLS_DeathSythe (edited May 29, 2003).]
Famous last words - "It seemed like a good idea at the time."
2003-05-29, 4:29 PM #3
hmm
i didnt get it to work... i click the door i assigned it to, and nothing happens..


------------------
"Everyone Dies..."
-Fett

My Website
Brad's Highschool Level
Unfinished Levels For Download
"Everyone Dies..."
-Fett

My Website
Brad's Highschool Level
Unfinished Levels For Download
2003-05-29, 4:38 PM #4
you sure that you setup the doors frames right?

------------------
Famous last words - "It seemed like a good idea at the time."
Famous last words - "It seemed like a good idea at the time."
2003-05-30, 2:55 AM #5
sorry, right after i posted that i got it to work [http://forums.massassi.net/html/smile.gif] thnks a lot


------------------
"Everyone Dies..."
-Fett

My Website
Brad's Highschool Level
Unfinished Levels For Download
"Everyone Dies..."
-Fett

My Website
Brad's Highschool Level
Unfinished Levels For Download

↑ Up to the top!