Frictional Games Forum (read-only)

Full Version: prop force
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
I tried a prop force script but all I get is " ERR: Expected '(' or ',' "

here's my code:
Code:
void OnStart()
{
AddEntityCollideCallback("door1_2_3", "door_collide1", "func_door123_collide", true, 1);
}

void func_door123_collide(string &in asParent, string &in asChild, int alState)
{
void AddPropForce("grunt_ragdoll_1", -100f, 0f, 0f, "world");
}

thanks (:
remove the void before addpropforce...
oh silly me...
fail hehe...same error.
float means that the number has decimals, yet you have none.

Code:
void OnStart()
{
AddEntityCollideCallback("door1_2_3", "door_collide1", "func_door123_collide", true, 1);
}

void func_door123_collide(string &in asParent, string &in asChild, int alState)
{
void AddPropForce("grunt_ragdoll_1", -100.0f, 0.0f, 0.0f, "world");
}
Thanks. Now I dont get any stupid errors Smile but now the prop wont fly towards the player :S. Any suggestions?
AddPropImpulse("Door", X, Y, Z, "World"); //red is x axis, blue is z axis, green is y axis.

tweek the numbers there to get the result you want
[Image: grunt.th.png]

Here's how it looks. I want the grunt to fly towards the door and -100 at X in my script will make him go with force against him but it doesn't work :/
Code:
void OnStart()
{
AddEntityCollideCallback("door1_2_3", "door_collide1", "func_door123_collide", true, 1);
}

void func_door123_collide(string &in asParent, string &in asChild, int alState)
{
AddPropForce("grunt_ragdoll_1", -100.0f, 0.0f, 0.0f, "world");
AddDebugMessage("Grunt should now move", false);
}

With debug messages turned on, does the message display? If it doesn't, the function is never called. If it does but the grunt doesn't move, something is wrong with the propforce command.
maybe you cant add propimpulse to that entity
How to check the debug messages? o.O
Pages: 1 2 3