Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Being dragged
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#1
Being dragged

Hello guys Blush! I am pretty new to scripting but already getting hang of it. Seems pretty easy if you have brains. But I have no idea tho, is it possible and if it is, how to create like you are dragged? In other words you are low to ground, you move forward, maybe some kind of path if possible and player is looking up or maybe little bit left or right.

Secondly, is it possible to set grunt not aggressive and just put it in front of my dude and force it to move in front of my dude like it is dragging me. If it is not, I can easily do all that without grunt and just put voices instead of grunt. My dude can watch one side and doesnt have to see grunt....

Thank you Smile.

The Interrogation
Chapter 1

My tutorials
08-15-2011, 10:04 PM
Find
GreyFox Offline
Member

Posts: 162
Threads: 23
Joined: Jul 2011
Reputation: 2
#2
RE: Being dragged

I'm not to sure how to do the dragging part (probably possible) as for making a grunt not aggresive theres an option in the level editor that says Disable Triggers (when you click the grunt) this will make him not react to the player. and then just make some path nodes for him to follow and you could simulate him dragging you.

Current Project
Forgotten
08-15-2011, 11:20 PM
Find
DamnNoHtml Offline
Senior Member

Posts: 469
Threads: 34
Joined: Sep 2010
Reputation: 16
#3
RE: Being dragged

You can easily do this with AddPlayerBodyForce.

Create a timer that has something like this:

void Drag (string &in asTimer)
{
     AddPlayerBodyForce(x,y,z,false);
     AddTimer("", 0.1, "Drag");
}

Change X Y and Z to how you want the character to be pushed. For example, if you want him to be dragged forward (along the Z axis, put something like)

void Drag (string &in asTimer)
{
     AddPlayerBodyForce(0,0,3000,false);
     AddTimer("", 0.1, "Drag");
}

When the player reaches the end area for the destination, just use the RemoveTimer() function.

Also, experiment with

MovePlayerHeadPos(float afX, float afY, float afZ, float afSpeed, float afSlowDownDist);

and

FadePlayerRollTo(float afX, float afSpeedMul, float afMaxSpeed);

Creator of Wake, Through the Portal, Insomnia, and Cycles What to do with HPL3....
08-15-2011, 11:31 PM
Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#4
RE: Being dragged

Thank you very much both Smile! You both helped out a lot Smile. I am working with my friend on custom story what you will hear about soon Smile!

The Interrogation
Chapter 1

My tutorials
08-15-2011, 11:34 PM
Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#5
RE: Being dragged

Quick question:

What is MovePlayerHeadPos and FadePlayerRollTo default values Smile?

The Interrogation
Chapter 1

My tutorials
08-16-2011, 02:50 AM
Find
DamnNoHtml Offline
Senior Member

Posts: 469
Threads: 34
Joined: Sep 2010
Reputation: 16
#6
RE: Being dragged

0 for all values.

Creator of Wake, Through the Portal, Insomnia, and Cycles What to do with HPL3....
08-16-2011, 04:39 AM
Find




Users browsing this thread: 2 Guest(s)