Daniel, who killed Alexander is going to be convicted of an murder, but something went very wrong. While he wakes up, he founds a note that explains everything for him, and his friend Dylan is helping him to get the heck out of here...

Post tutorial Report RSS Change Gravity to Entities :)

Today I'm going to give you my code, and explain how to change gravity of almost any Entities (except Monsters, and some stuff)

Posted by on - Basic Client Side Coding

Tutorial
Add this code on your start :

void OnStart()
{   
AddTimer("FloatTime", 0.01, "FloatObjects");
}


Then make the void :

void FloatObjects(string &in asTimer)
{
    AddPropImpulse("vase02_1", 0, 0.15, 0, "");
}

1. The entity name // Example : "vase02_1"
2. Direction along the X-axis // Leave it to 0
3. Direction along the Z-axis // We only need this because we want it to float upwards not sideways
4. Direction along the Y-axis //Leave it to 0
5. Determines which coordinate system is used, usually “world” //Leave it blank

NOTE: Stoping the timer will make entity to drop down !!

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: