The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
Script Help [SOLVED] AddBodyForce doesn't work
Kiwi2703 Offline
Junior Member

Posts: 27
Threads: 5
Joined: Sep 2012
Reputation: 2
#1
[SOLVED] AddBodyForce doesn't work

Hey Smile
I have an area called ScriptArea_2. I want the player to be pushed forward (about 1 meter) and slighty upward (~0.2m) when he collides with the area.
The script looks like this:

void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_2", "theforce", true, 1);
}

void theforce(string &in asParent, string &in asChild, int alState)
{
AddBodyForce("Player", 0.0f, 500.0f, 5000.0f, "world");
}

I set the values so high only for experimental purposes. The problem is, when I walk into the area, absolutely nothing happens.
Any help? Thanks! Smile
(This post was last modified: 09-07-2012, 10:50 AM by Kiwi2703.)
09-06-2012, 06:35 PM
Find


Messages In This Thread
[SOLVED] AddBodyForce doesn't work - by Kiwi2703 - 09-06-2012, 06:35 PM
RE: AddBodyForce doesn't work - by Robby - 09-06-2012, 06:38 PM
RE: AddBodyForce doesn't work - by Kreekakon - 09-06-2012, 06:44 PM
RE: AddBodyForce doesn't work - by Kiwi2703 - 09-06-2012, 06:52 PM
RE: AddBodyForce doesn't work - by Robby - 09-06-2012, 06:56 PM
RE: AddBodyForce doesn't work - by Kiwi2703 - 09-06-2012, 06:59 PM
RE: AddBodyForce doesn't work - by Robby - 09-06-2012, 07:02 PM
RE: AddBodyForce doesn't work - by EXAWOLT - 09-06-2012, 06:44 PM
RE: AddBodyForce doesn't work - by Robby - 09-06-2012, 06:48 PM
RE: AddBodyForce doesn't work - by EXAWOLT - 09-06-2012, 06:51 PM
RE: AddBodyForce doesn't work - by EXAWOLT - 09-06-2012, 06:52 PM



Users browsing this thread: 1 Guest(s)