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 → Do you think i should sumbit this cog?
Do you think i should sumbit this cog?
2004-03-31, 10:07 PM #1
My friend hated the JK rotateing doors cog. I dont know why but he did, he wanted something less hard to use and enlisted me!
Code:
# PJ_rotate.cog
#
# this cog will rotate two things allong a set number of degries
# the number of degries must ALLWAY be posive, change the right int
# to 0 for positive, 1 for negative.
#
#
symbols
message activated
thing 	door0
thing 	door1
int	right=0
int	angle=90
int	a=0		local
int	b=0		local
int	c=0		local
int	d=0		local
int	i=0		local
flex	time=0.5	local
vector	lvec		local
vector	lvec2		local
end
code
activated:
if(d==0 && right==0)c=0;
if(d==0 && right==1)c=1;
if(d==1 && right==1)c=0;
if(d==1 && right==0)c=1;
if(c==0)
{
if(b==0)
{
lvec2=GetThingLVec(door0);
a=vectorY(lvec2); 
for(i=0;i<=angle;i=i+1)
{
lvec=VectorSet(0, i+a, 0); 
SetThingLook(door0, lvec); 
sleep(angle/time);
}
b=1;
call activated;
return;
}
if(b==1)
{
lvec2=GetThingLVec(door1);
a=vectorY(lvec2); 
for(i=0;i>=angle;i=i+1)
{
lvec=VectorSet(0, i+a, 0); 
SetThingLook(door1, lvec); 
sleep(angle/time);
}
b=0;
d=1;
return;
}
}
if(c==0)
{
if(b==1)
{
lvec2=GetThingLVec(door0);
a=vectorY(lvec2); 
for(i=angle;i<=0;i=i-1)
{
lvec=VectorSet(0, a-i, 0); 
SetThingLook(door0, lvec); 
sleep(angle/time);
}
b=1;
call activated;
return;
}
if(b==1)
{
lvec2=GetThingLVec(door1);
a=vectorY(lvec2); 
for(i=angle;i<=0;i=i-1)
{
lvec=VectorSet(0, a-i, 0);
SetThingLook(door1, lvec); 
sleep(angle/time);
}
b=0;
d=0;
return;
}
}
return;
end


Now i realise that it relies on the pivoit point of the door 3DO being on the side of the door, but i am thinking of explaining how to fix that in the readme.

do you think its worth submiting to massassi?

------------------
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
2004-04-01, 9:49 AM #2
Make 50 awseome cogs, and ten submit all of them to Massassi. That would be even better! [http://forums.massassi.net/html/tongue.gif]

------------------
~ Vader's Corner ~ The place to submit your poetical works!
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2004-04-01, 9:52 AM #3
Why not? Good to have variety after all. [http://forums.massassi.net/html/smile.gif]

------------------
Bond, Power, CA, The Force, Saber, IC, Epic, Oily Mexican Food, BG, /\ |> /\ /\/\, Sentences.
Now you know where I've been.
May the mass times acceleration be with you.
2004-04-02, 5:48 AM #4
hmm, you know daft i allready have about 50 cogs, prehaps i should sumbit a cog pack of my best.

i think ill write up a readme and sumbit it either way [http://forums.massassi.net/html/biggrin.gif]

------------------
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
2004-04-02, 2:22 PM #5
Yeah, that cog looks pretty sweet. I'd submit it.

------------------
One day, after everybody else quits, I'll be the best.
Sith Mercenaries
^My site.
One day, after everybody else quits, I'll be the best.
Sith Mercenaries
^My site.

↑ Up to the top!