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
Multiple Issues Help Is this possile?
DRedshot Offline
Senior Member

Posts: 374
Threads: 23
Joined: Jun 2011
Reputation: 11
#4
RE: Is this possile?

Just for fun I thought I'd try to do this, I made this little script Smile
void OnStart{

AddEntityCollideCallback("Player" , "FlyArea" , "FlyNow" , false , 1);

}

void FlyNow(string &in asParent, string &in asChild, int alState) // Player hits area
{
    SuperFlyScript("vase_1"); // Function to start flying
}
void SuperFlyScript(string &in asEntity){
    AddTimer(asEntity, 0.05f, "FloatUp");
    AddTimer(asEntity, 1.5f, "PushHard");
}
void FloatUp(string &in asEntity){ // Entity floats for 1.5s
    if(GetTimerTimeLeft(asEntity)!=0.0f){
        AddDebugMessage("FloatModeActivated!", true);
        AddPropImpulse(asEntity , 0.0f , 0.5f , 0.0f , "world");
        AddTimer(asEntity, 0.05f, "FloatUp");
    }
}
void PushHard(string &in asEntity){ // Entity is pushed away!
    AddDebugMessage("PushModeActivated!", true);
    AddPropForce(asEntity , 3000.0f , 1000.0f , 0.0f , "local");
    RemoveTimer(asEntity);
}

You can even use different entities! SuperFlyScript(asEntity);
(Heavy objects probably wont be affected, because only a small force is applied)

04-15-2012, 07:19 PM
Find


Messages In This Thread
Is this possile? - by JetlinerX - 04-15-2012, 04:30 AM
RE: Is this possile? - by Statyk - 04-15-2012, 04:42 AM
RE: Is this possile? - by Adrianis - 04-15-2012, 05:49 PM
RE: Is this possile? - by DRedshot - 04-15-2012, 07:19 PM
RE: Is this possile? - by palistov - 04-15-2012, 10:29 PM
RE: Is this possile? - by Apjjm - 04-15-2012, 10:42 PM
RE: Is this possile? - by palistov - 04-16-2012, 12:11 AM
RE: Is this possile? - by nemesis567 - 04-16-2012, 12:56 AM



Users browsing this thread: 4 Guest(s)