Page 1 of 1
force thingy
Posted: Sat Mar 24, 2007 4:55 am
by darksmaster923
i made a script so that when the mouse clicks, the pawn forces to a dir but when i put positiontoplayer it doesnt force
script part
Code: Select all
case 2
{
MatchPlayerAngles();
ForceLeft(10);
PlayerToPosition(0, 0, 0);
//if i put PositionToPlayer(float OffsetX, float OffsetY, float OffsetZ ); it doesnt force but i need it to be at the player & to force
}
case 3
{
MatchPlayerAngles();
ForceRight(10);
PlayerToPosition(0, 0, 0);
}
Posted: Sat Mar 24, 2007 5:22 am
by zany_001
Maybe swap ForceRight(10); with PlayerToPosition(0, 0, 0);i dont know enough though
Posted: Sat Mar 24, 2007 5:27 am
by darksmaster923
i tried that it works fine execpt that the player glitches though the wall very easily
Posted: Sat Mar 24, 2007 5:42 am
by zany_001
You mean what i said worked?!?!?!
***EDIT***
Perhaps if there is a command called something like getDisWall() which gets the distance to neareast wall(i didnt look too hard so it might exist):
Code: Select all
if getDisWall()==2
{
forceRight("Forcebackwall")
}
{
if forceApllied("true")
{
Forcebackwall=forceAplliedAmount
}
else Forcebackwall=1
}
And everytime you applied a force, you would define forceApllied as true,and forceAplliedAmount as the amount of force applied(in your case 10)and when the force ended, then define forceApllied as false.
might not work though
(the script was messy i know but in still learning

)
Posted: Sat Mar 24, 2007 5:33 pm
by darksmaster923
zany_001 wrote:You mean what i said worked?!?!?!
***EDIT***
Perhaps if there is a command called something like getDisWall() which gets the distance to neareast wall(i didnt look too hard so it might exist):
Code: Select all
if getDisWall()==2
{
forceRight("Forcebackwall")
}
{
if forceApllied("true")
{
Forcebackwall=forceAplliedAmount
}
else Forcebackwall=1
}
And everytime you applied a force, you would define forceApllied as true,and forceAplliedAmount as the amount of force applied(in your case 10)and when the force ended, then define forceApllied as false.
might not work though
(the script was messy i know but in still learning

)
well i tried it before
the thing with getting the nearest wall, tried that too. it doesnt work. It gets me away from one wall but glitches me into another.
Posted: Sat Mar 24, 2007 11:48 pm
by darksmaster923
okay, gots a solution
i added a random value 1,10 < 3 position to player and works
this also lets me clean up my very messy script
Posted: Sun Mar 25, 2007 9:23 pm
by zany_001
Whats the script for?
Posted: Sun Mar 25, 2007 11:14 pm
by darksmaster923
to make the player automatically move to fake inaccuracy
Posted: Mon Mar 26, 2007 12:29 am
by zany_001
Couldnt you just apply a random force to the projectlie?
[/code]
Posted: Mon Mar 26, 2007 1:08 am
by darksmaster923
no