Page 1 of 1

Hit Target Problem

Posted: May 2nd, 2020, 10:37 pm
by creazee
I'm using this code:

Code: Select all

main()
{
thread bonus_targ_1();
}

bonus_targ_1()
{
trapdoor=getent("bonus_targ_1","targetname");
trig=getent("bonus_targ_trig_1","targetname");
while(1)
{
trig waittill ("trigger");
trapdoor rotateto( (0,0,-90),0.3);
trapdoor waittill ("rotatedone");
wait (3);
trapdoor rotateto( (0,0,0),1.7);
trapdoor waittill ("rotatedone");
}
} 
It works but the target rotates from the middle of the target.

I want to it make it fully go down like mp_trial.

Any help?

Thanks

Re: Hit Target Problem

Posted: May 8th, 2020, 7:41 pm
by Pedsdude
Althought it's for CoD1 and not CoD4, this is probably still relevant:
http://www.codjumper.com/forums/viewtopic.php?t=7054

You need to make sure your origin is positioned at the point you want to rotate/pivot from.