Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Being dragged
Author Message
Elven Offline
Posting Freak

Posts: 868
Joined: Aug 2011
Reputation: 26
Post: #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 all posts by this user Quote this message in a reply
GreyFox Offline
Member

Posts: 162
Joined: Jul 2011
Reputation: 2
Post: #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 all posts by this user Quote this message in a reply
DamnNoHtml Offline
Senior Member

Posts: 386
Joined: Sep 2010
Reputation: 11
Post: #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, and Insomnia
08-15-2011 11:31 PM
Find all posts by this user Quote this message in a reply
Elven Offline
Posting Freak

Posts: 868
Joined: Aug 2011
Reputation: 26
Post: #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 all posts by this user Quote this message in a reply
Elven Offline
Posting Freak

Posts: 868
Joined: Aug 2011
Reputation: 26
Post: #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 all posts by this user Quote this message in a reply
DamnNoHtml Offline
Senior Member

Posts: 386
Joined: Sep 2010
Reputation: 11
Post: #6
RE: Being dragged
0 for all values.

Creator of Wake, Through the Portal, and Insomnia
08-16-2011 04:39 AM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)