Hit Target Problem

Have questions about CoD4 mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

Post Reply
creazee
CJ Wannabe
CJ Wannabe
Posts: 4
Joined: October 16th, 2019, 6:07 pm

Hit Target Problem

Post by creazee » May 2nd, 2020, 10:37 pm

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

Pedsdude
Site Admin
Site Admin
Posts: 15908
Joined: October 15th, 2004, 7:18 pm
Location: UK

Re: Hit Target Problem

Post by Pedsdude » May 8th, 2020, 7:41 pm

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.
Image
Image

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest