View Full Version : Door cog
sskakarot51
05-06-2003, 12:07 PM
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.
------------------
DSLS_DeathSythe
05-06-2003, 01:10 PM
# 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."
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.