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 → A nice problem...
A nice problem...
2004-02-02, 7:47 AM #1
Hi!
I need either someone to make me a COG, or give me pointers to how to make a COG.

In this COG, when a player activates a seat (thing or surface), the player shall move infront of the seat, and then sit. And every now and then, the player shall do some idle movements. The player won't get up until either he activates his seat again, or he moves via IsMoving(player);. And this is for JK MP. Now, my father has occupied all PCs so I can't test your code soon, so could you test it before hand?

/Edward
Edward's Cognative Hazards
2004-02-03, 12:52 PM #2
You can't move the player via cog, unless you use keyframes or make the player invisible and use a player-looking actor, or you can use applyforce (though I don't recommend it because it won't look right, and will take a lot of trial-and-error).

Also, how can the player activate the chair while he's sitting in it?

------------------
"The Just shall live by faith." -Galatians 3:11
"Now faith is the substance of things hoped for, the evidence of things not seen." -Hebrews 11:1
"There is one body, and one Spirit, even as ye are called in one hope of your calling; One Lord, one faith, one baptism, One God and Father of all, who is above all, and through all, and in you all. But unto every one of us[/i] is given grace according to the measure of the gift of Christ." -Ephesians 4:4-7

The Giant Internet IC Masturbator - the most complete index of IC chips on the net.
Catloaf, meet mouseloaf.
My music
2004-02-04, 6:52 AM #3
keyframes tend to be.. unstable if you try and pause them on aparticular start or end (look up the flags)

i think you'd be best with a new player+ chair 3do and some keyframes, jsut switcht eh 3do when you want the guy to sit down.

i tryed it ona matrix level, worked fine

------------------
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-02-06, 5:15 AM #4
Well, I tried something and I got this:
Code:
# Sitting
#
# By Edward
symbols

message		activated

thing		player		local

keyframe	sit

surface		seat
thing		chair

# Can be either or

int		key=-1		local

int		trigy		local

end
#
code
activated:
	If((GetSenderRef()==seat) || (GetSenderRef()==chair))
	{
		player=GetSourceRef();
		if(key==-1) { key=PlayKey(player,sit,1,0x4); }
		else { StopKey(player,key,1); key=-1; }
	}
return;
end

Here, I have to jump onto the seat before activating. Then I'm seated. How do I fix this so that it will work in MP, all will see correct, and that I'm infront of the seat, and also some idle movements. And I guess I could allow the player to be Teleported infront of the seat.

/Edward
Edward's Cognative Hazards
2004-02-06, 9:40 AM #5
I think keyframes are synchronized automatically in mp games (though I'm not 100% sure). As for the rest, I don't know. Sorry.

------------------
"Now faith is the substance of things hoped for, the evidence of things not seen." -Hebrews 11:1
"There is one body, and one Spirit, even as ye are called in one hope of your calling; One Lord, one faith, one baptism, One God and Father of all, who is above all, and through all, and in you all. But unto every one of us[/i] is given grace according to the measure of the gift of Christ." -Ephesians 4:4-7

The Giant Internet IC Masturbator - Index of IC pinouts
Catalog of Electronic Components - Complete IC information
National Electrical Code (NEC) Online - Don't do wiring without consulting it. OR ELSE!
Catloaf, meet mouseloaf.
My music
2004-02-09, 8:45 AM #6
moof
Edward's Cognative Hazards

↑ Up to the top!