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 locked, then not
Door locked, then not
2003-02-19, 2:03 PM #1
How would I make a door start locked, and then after you go somewhere, view a cutseen, the door is no longer locked?
2003-02-19, 2:23 PM #2
Code:
Message Entered
Message Activated

Sector Enter_sector
Int Locked=1   Local


#blah...


end
code

Entered:
If(Getsenderref() == Enter_sector) Locked = 0;
Stop;

Activated:
If(Locked) Stop;


//Blah...


Stop;
End



I think you can get the idea...


------------------
Createthingatpos(GBK, 0, '0 0 0', '0 0 0');
And when the moment is right, I'm gonna fly a kite.
2003-02-19, 2:33 PM #3
Will your cog work, or will there need to be a thing door in symbols?

------------------
2003-02-19, 2:37 PM #4
GBK saids to add that part to the cog. the #blah means the rest.

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2003-02-19, 5:01 PM #5
I mean, how will I get JED to know which thing the door is? I know I need to add a thing door, but how in the code do I tell it which thing?
2003-02-19, 5:48 PM #6
Also, would it be the same code if after you go through the door that isn't locked anymore
, if you go back, there is a different cutseen and the door there then opens?
2003-02-19, 11:11 PM #7
Move the cog to the your project's cog folder, then in JED, hit F7 and add the cog via the menu. Then click on it and a enter the necessary values in the appearing fields.

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2003-02-19, 11:13 PM #8
Oh and BTW: GBK just showed you a snippet, it's not the full cog.

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2003-02-20, 3:26 AM #9
You guys are hopeless [http://forums.massassi.net/html/frown.gif] I KNOW is part if the cog, but WHAT do I need to add to the code? If(Getsenderref() == Enter_sector) Locked = 0, door;? THATS what I'm asking.
2003-02-20, 4:33 AM #10
Activated:
If(locked) Return;

Be more clearer, vagueness doesn't get what you want here, trust me. [http://forums.massassi.net/html/wink.gif]

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2003-02-21, 2:17 AM #11
I'll give you more of a code!

Code:
# Locked and not
#
# By Edward
symbols

message    startup
message    entered
message    activated

thing      door
sector     enterable

int        locked=1    local

from here on you add the neccessary symbols to your Cut-scene.
Code:
end
#
code
startup:
        locked=1;
        MoveToFrame(door,0,100);
return;
activated:
        If(GetSenderRef()!=door) return; //IF NOT door, then forget about it!
        If(locked==1) return;
        MoveToFrame(door,1,8);
return;
entered:

now add your cut-scene here.

There is another way. The door is connected to a normal Locked Door COG, and when you are in a cut-scene you secretly get a key.

This is all I can give you for now. I'm at school and the teacher is not keeping an eye on me.

/Edward
http://edward.leuf.org
[url="mailto:edward@leuf.org"]mailto:edward@leuf.org[/url]edward@leuf.org</A>
Edward's Cognative Hazards

↑ Up to the top!