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 → Door cog
Door cog
2003-05-06, 9:07 AM #1
Theres a cog on the site that does something similar but it always open on startup :/ and it doesnt work right.

I need sometype of cog that works only ONCE and when you shoot a surface a door opens and stays open indefinitly.

------------------
2003-05-06, 10:10 AM #2
Code:
# Written By DSLS_DeathSythe
symbols
#-----
message   startup
message   damaged
thing     door=-1
surface   dmg_surf     mask=0x8
flex      move_spd=8.0
#-----
end
#-----
code
#-----
startup:
  MoveToFrame(door, 0, move_spd);
return;
#-----
damaged:
  if((GetSenderRef() != dmg_surf) ||
     (GetParam(1) != 0x2) ||
     (GetCurFrame(door) != 0))
    {
    ReturnEx(0);
    return;
    }
  MoveToFrame(door, 1, move_spd);
  ReturnEx(0);
return;
#=====
end

that should do it.

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

↑ Up to the top!