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 → Controlling Object
Controlling Object
2002-03-16, 4:00 PM #1
I'm attempting to modify force grip in such a way that the victim can be picked off the ground, and moved around by the player rotating. I was hoping this could be done via AttachThingToThingEx(), but apparently not. Any ideas?
Capitalization
Commas
Periods
Question Marks
Apostrophes
Confusable Words
Plague Words
2002-03-16, 4:13 PM #2
I have tried that too ever since the idea came from JO. Anyway, I found no luck. Sorry.

------------------
Ohh Crap! - Darien Fawkes (The Invisible Man)
Ohh Crap! - Darien Fawkes (The Invisible Man)
2002-03-16, 4:30 PM #3
Why won't it work? Some pseudocode:

Check if the player is on the ground. If he is, create a ghost slightly above him. Teleport him to the ghost and attach him to it with AttachThingToThingEx(). And add the 0x8 Attach Flag.

It seems like that would work.

------------------
Author of the Jedi Knight DataMaster.
Visit Saber's Domain.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-03-16, 6:37 PM #4
But what about being able to move the victim sideways? For moving the victim upwards, creating a vector and ApplyForce() would be a better means, but my goal is to be able to actually move the victim sideways as well as up and down.
Capitalization
Commas
Periods
Question Marks
Apostrophes
Confusable Words
Plague Words
2002-03-19, 5:53 AM #5
Ok, I see what you mean. [http://forums.massassi.net/html/wink.gif]

Try something like:

Code:
if(gthing == -1)
{
	gpos=VectorAdd(GetThingPos(victim), '0 0 0.2');
	gthing=CreateThingAtPos(LoadTemplate("+gtemp"), GetThingSector(victim), gpos, '0 0 0');
	ClearPhysicsFlags(victim, 0x1);
	TeleportThing(victim, gthing);
}

randpos=VectorAdd(VectorScale(RandVec(), 0.1), gpos);
lvec=VectorNorm(VectorSub(randpos, GetThingPos(victim)));
ApplyForce(victim, VectorScale(lvec, 50));


I tested this with actors in SP and used AIClearMode(victim, 0xfff) to stop the AI.

Good luck. [http://forums.massassi.net/html/wink.gif]

------------------
Author of the Jedi Knight DataMaster.
Visit Saber's Domain.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-03-19, 2:18 PM #6
What what that look like in the Force Grip cog?
Ohh Crap! - Darien Fawkes (The Invisible Man)

↑ Up to the top!