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
Some scripting help here please :)
phatdoggi Offline
Junior Member

Posts: 17
Threads: 4
Joined: Jun 2013
Reputation: 0
#2
RE: Some scripting help here please :)

Check dem comments

void OnStart()
{
AddEntityCollideCallback("Player", "barrelarea", "barrelpush", true, 1);
AddEntityCollideCallback("barrel_1", "barrelbangarea", "barrelscare", true, 1);
}

// Maybe it's just me, but aren't the parameters "string &in asParent, string &in asChild, int alState" for an entity collide callback? for your barrelpush and barrelscare functions

void barrelpush(string& asParentName, string& asChildName, string& asFunction, bool abDeleteOnCollide, int alStates)
{
    //Your barrel is going to move pretty freakin fast. Do you want it to roll or teleport at the speed of light? Make sure your force is directed towards the correct axis just in case
        AddPropForce("barrel_1", 0, 0, 20000, "world");
}

void barrelscare(string& asParentName, string& asChildName, string& asFunction, bool abDeleteOnCollide, int alStates)
{
        PlaySoundAtEntity("", "lurker_hit_wood.snt","barrel_1", 0, false);
        CreateParticleSystemAtEntity("", "ps_break_wood.ps", "barrel_1", true);
        SetEntityActive("barrel_1", false);
        SetEntityActive("nakedguy", true);

        // again, make sure you have the force amount and the direction figured out and you're good :D
        AddPropForce("nakedguy", 0, 0, 5000, "world");

        //Play a screaming sound or something for added effect :)
}

"Just drink it. How bad could it be?"
Madness - http://www.moddb.com/mods/phatdoggi-madness
06-03-2013, 09:37 PM
Find


Messages In This Thread
RE: Some scripting help here please :) - by phatdoggi - 06-03-2013, 09:37 PM



Users browsing this thread: 1 Guest(s)