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 → Either, Or...
Either, Or...
2004-01-14, 6:53 AM #1
Well, I am making a custom camera cog for JK. Instead of using
SetActorFlags(player, 0xa00000), Im using SetActorFlags(player, 0x840000). This means that he cannot move or jump, but he can still crouch. The only trouble I have is that the player can rotate. Is there a way to fix this? I need the player to still be able to crouch.

EITHER:
I have already fixed the shooting-while-in-camera issue, I just dont want the player to be able to rotate while viewing, but still be able to deactivate the screen/console

OR:
Can JK detect when a player presses the USE key, not just activating a surface or object? Because I could have the player exit the camera just by pressing the USE key instead of activating the surface again...(because the player rotates away from the surface)


thanks
This is retarded, and I mean drooling at the mouth
2004-01-14, 8:32 AM #2
You cant lock the player's rotation in JK without locking him up completely. Sorry. Its just not possible. It may be in Mots, but not in JK.

------------------
The future is here, and all bets are off.
And when the moment is right, I'm gonna fly a kite.
2004-01-14, 8:42 AM #3
Well, can JK detect when the USE key is activated through cog? that would be my second option

------------------
nil nip nada zip zero naught lip zil
This is retarded, and I mean drooling at the mouth
2004-01-14, 8:44 AM #4
what if you will pulse look what is player rot vel and if its not same as on begin rotate player back?

------------------
The miners of Kiith Somtaaw sacificed much, and risked all. For their efforts they were brought into the inner most circle of Hiigaren power. Naabal, S'jet, and Sobanii bowed before them. And from that day to this, Somtaaw's children have been known to one and all as Beastslayers..
2004-01-14, 9:40 AM #5
Thats an interesting idea.. GetThingRotVel? Ive never use that, and cogwriter has a "?" by it... it has a flex value doesnt it? Or is it a vector I really dont know. Any other input?
(Is there another cog that has that line so I can learn off of it?)

[This message has been edited by F-Body (edited January 14, 2004).]
This is retarded, and I mean drooling at the mouth
2004-01-14, 10:03 AM #6
Quote:
<font face="Verdana, Arial" size="2">Originally posted by F-Body:
...GetThingRotVel? Ive never use that, and cogwriter has a "?" by it... ...</font>


First, dont use Cogwriter. Cogwriter sucks. Use CogPad instead. CogPad is much better. [http://forums.massassi.net/html/smile.gif]

Second, get the Datamaster. Its invaluable.

Third, no, unfortunatly you cant check to see if the player is pressing the USE buttion either, unless your in MotS... You could, however, place the player in the middle of a small sphere, so that no matter where he looks, he will always be facing an object......

------------------
The future is here, and all bets are off.
And when the moment is right, I'm gonna fly a kite.
2004-01-14, 10:03 AM #7
its a vector, all velcoitys, positions, and vectors, are vectors. now i think you want a code like this (i am guessing you dont want the player to be able to look up or down either, if you do.. ill have to rewrite)
i havent tested the cog yet, but it should work. if not, tell me about it. you can use this cog if you like, but do credit me [http://forums.massassi.net/html/biggrin.gif]
Code:
#	JK cog script
#
#	PJ_nomove.cog
#	
#	stop the player from rotateing looking
#	up or down, and moveing.
#
#	[PJB]
#	14/jan/2004
symbols
message	pulse
message	startup
template ghost_template=ghost	local
thing	ghost	local
vector	lvec	local
thing	player	local
int	i=0	local
end
code
startup:
player=jkgetlocalplayer();
SetActorFlags(player, 0x840000);
return;

Pulse:
if(i==0)
{
ghost=FireProjectile(player, ghost_template, -1, -1, '0 0 0', '0 0 0', 0, 0, 0, 0);
lvec=GetThingLVec(ghost);
SetThingVel(ghost, '0 0 0'); 
i=1;
return;
}

if(i==1)
{
setthinglook(player,lvec);
return;
}
return;
end


------------------
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-01-14, 10:10 AM #8
Quote:
<font face="Verdana, Arial" size="2">Originally posted by GBK:
First, dont use Cogwriter. Cogwriter sucks. Use CogPad instead. CogPad is much better. [http://forums.massassi.net/html/smile.gif]
</font>


In my opinion CogPad sucks much more than CogWriter thankyouverymuch.



------------------
ILLEGAL PORNOGRAPHIC VIDEOS NEWEST GAMES MP3Z AND MOVIES!!!
Last edited by mb; today at 10:55 AM.
2004-01-14, 10:37 AM #9
First, sorry that i'm supporting the moving of this topic off the main point...

I've never tried CogPad, but I have to say the program that comes with that "Mod Makers Pack" called CogEd is the best cog program I've ever seen. It has built-in JK Specs, that's pretty much the reason why i love 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.
2004-01-14, 11:32 AM #10
THE BEST cog editing set I've used so far is Notepad (construction), Parsec(checking), Scribe(Neat-ifying [http://forums.massassi.net/html/tongue.gif]), and Datamaster(reference and learning). Nothing has beat it yet. I used to use cogwriter, but it takes too long to load and I don't need the linebuilder at all anymore with the Datamaster.
For stopping the player from rotating. Try StopThing(thing) and/or SetThingRotVel(thing,vel) in a pulse message. I really have no idea if it will work or not. Good luck.

------------------
It's Peanut Butter Jelly Time!
/Banana starts dancing
May the mass times acceleration be with you.
2004-01-14, 12:50 PM #11
Its been awhile... but I am sure SetThingLook adjusted the players rotation from his chest, not his head pitch. The only way you could do this would be by use of a camera.

And your choice in a cog writing program is purely personal. Dont argue over nothing and get nowhere because your opinion differs from anothers. It would be like arguing about choice of music, colour etc.

------------------
Team Battle.
Team Battle.
2004-01-14, 5:48 PM #12
Quote:
<font face="Verdana, Arial" size="2">Originally posted by CaveDemon:
In my opinion CogPad sucks much more than CogWriter thankyouverymuch.</font>


Why? [http://forums.massassi.net/html/frown.gif]

------------------
The future is here, and all bets are off.
And when the moment is right, I'm gonna fly a kite.
2004-01-14, 11:56 PM #13
Ctrl+X

but i still use it as it has a direct link to parsec, and who can function without that?

------------------
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-01-15, 5:46 AM #14
Or I could make a ghost thing at the position of the surface and have the player look at the ghost's position while in camera. How would I do that?

SetThingLook(player, GetThingPos(ghost_pos));
^that would only have the player look at it once but still be able to look at other things right?

[This message has been edited by F-Body (edited January 15, 2004).]
This is retarded, and I mean drooling at the mouth
2004-01-15, 10:28 AM #15
If you had a pulse message that set the SetThingLook() it would set the players look position over and over.

------------------
In rememberance of MaDaVentor...one of the best Massassians out there.

Check out updates for my editing work at the Shadow Jedi Academy.
2004-01-16, 10:15 AM #16
Thanks guys, I got it working perfectly

------------------
nil nip nada zip zero naught lip zil
This is retarded, and I mean drooling at the mouth

↑ Up to the top!