• Register
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
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Tutorial
Browse
Tutorials
Report
Report
Share
Related Games
Related Groups
VisualTeam
VisualTeam Developer