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
Move the Player and Vomit
convolution223 Offline
Member

Posts: 78
Threads: 15
Joined: Jul 2011
Reputation: 0
#1
Move the Player and Vomit

How do I move my inactive player? I tried this:

void Jump (string &in asTimer){
SetEntityActive("AltarGrunt1", false);
SetEntityActive("AltarGrunt2", false);
  TeleportPlayer("PlayerStartEnd2");
  AddTimer("",5.2f,"Ending");
}
void Ending(string &in asTimer){
AddPlayerBodyForce(10000, 3000, 2500, true);
FadeOut(3.2f);
AddTimer("",3.3f,"startcredits");
}

and I tried this line of code instead of the AddPlayerBodyForce with coordinates I found in the map that'd be a good place to drop the player in the air and hopefully make it look like they jumped:
AddBodyForce("Player", -24.5f, 13.25f, -1.5f, "world");

Also, I was wondering how I might simulate the player vomiting. blood. yes, bloody vomit. I got the player to look down at a script area that calls a function that makes a particle system but the particle system doesnt look right if the player isn't standing at the exact right spot when he triggers the event. I also thought of making the particle effect on the player himself instead of the floating script area, but that doesn't work at all. In fact, I didn't see any part of the particle effect when I tried that. And sorry for all the threads i've been making lately in the forum, this is my first mod.
07-28-2011, 05:53 AM
Find
Tanshaydar Offline
From Beyond

Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation: 67
#2
RE: Move the Player and Vomit

Typing is wrong.

void AddPlayerBodyForce(float afX, float afY, float afZ, bool abUseLocalCoords);

Pushes the player into a certain direction. Note that you need values above ~2000 to see any effects.

afX - amount along the X-axis
afY - amount along the Y-axis
afZ - amount along the Z-axis
abUseLocalCoords - If true, axes are based on where the player is facing, not the world.


Also, use 6000 or more to move player and do not use local coordinates.

(This post was last modified: 07-28-2011, 07:22 AM by Tanshaydar.)
07-28-2011, 07:21 AM
Website Find
convolution223 Offline
Member

Posts: 78
Threads: 15
Joined: Jul 2011
Reputation: 0
#3
RE: Move the Player and Vomit

Thanks, that worked! not sure why the other attempts didn't though. And I think I might have to give up on the blood vomit since there doesn't seem to be a really good way of doing it.
07-28-2011, 07:37 PM
Find




Users browsing this thread: 3 Guest(s)