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
[SOLVED]AddPropForce problem :(
bjaffedj Offline
Junior Member

Posts: 39
Threads: 8
Joined: Aug 2012
Reputation: 0
#1
[SOLVED]AddPropForce problem :(

Hey everyone! i sitting here with an annoying problem :/
I have made some birds(modelled, and imported them as staticprops), but whenever i try to make them move continously, they just do'nt seem to be going anywhere :/ i get no errors or nothing, and all the birds are called :/ Help is gladly appreciated Smile

The code:

void OnStart(){
//Variables
AddLocalVarInt("MoveBirdsInt", 1);

//Colliders
AddEntityCollideCallback("bird_1", "StopBirds", "StopMoveBirds", true, 1);

//Timers
AddTimer("MoveBirdsBuilding", 0, "MoveBirds");
}

void MoveBirds(string &in asTimer){
    if(GetLocalVarInt("MoveBirdsInt") < 50){
        AddPropForce("bird_1", -5000.0f, 0, 0, "world");
        AddPropForce("bird_2", -5000.0f, 0, 0, "world");
        AddPropForce("bird_3", -5000.0f, 0, 0, "world");
        AddPropForce("bird_4", -5000.0f, 0, 0, "world");
        AddPropForce("bird_5", -5000.0f, 0, 0, "world");
        AddPropForce("bird_6", -5000.0f, 0, 0, "world");
        AddPropForce("bird_7", -5000.0f, 0, 0, "world");
        AddPropForce("bird_8", -5000.0f, 0, 0, "world");
        AddPropForce("bird_9", -5000.0f, 0, 0, "world");
        AddPropForce("bird_10", -5000.0f, 0, 0, "world");
        AddPropForce("bird_11", -5000.0f, 0, 0, "world");
        AddPropForce("bird_12", -5000.0f, 0, 0, "world");
        AddTimer("MoveBirdsRe", 0.1f, "MoveBirds");
    }
}

void StopMoveBirds(string &in asParent, string &in asChild, int alState){
    SetLocalVarInt("MoveBirdsInt", 50);
}
(This post was last modified: 05-07-2014, 06:43 PM by bjaffedj.)
05-07-2014, 06:12 PM
Find


Messages In This Thread
[SOLVED]AddPropForce problem :( - by bjaffedj - 05-07-2014, 06:12 PM
RE: AddPropForce problem :( - by DnALANGE - 05-07-2014, 06:19 PM
RE: AddPropForce problem :( - by bjaffedj - 05-07-2014, 06:23 PM
RE: AddPropForce problem :( - by DnALANGE - 05-07-2014, 06:27 PM
RE: AddPropForce problem :( - by bjaffedj - 05-07-2014, 06:28 PM
RE: AddPropForce problem :( - by DnALANGE - 05-07-2014, 06:35 PM
RE: AddPropForce problem :( - by bjaffedj - 05-07-2014, 06:42 PM
RE: AddPropForce problem :( - by DnALANGE - 05-07-2014, 06:43 PM



Users browsing this thread: 1 Guest(s)