Home   Help Search Login Register  

Author Topic: Vehicle tracking without all that otha stuff  (Read 939 times)

0 Members and 1 Guest are viewing this topic.

max_killer_payne

  • Guest
Vehicle tracking without all that otha stuff
« on: 11 Jul 2003, 19:56:48 »
I havent tried this yet, but in theory wouldnt this work?

Code: [Select]
#loop
_cam camsettarget plane
_cam camsetrelpos [0,50,50]
_cam camcommit 0
@camcommitted _cam
goto "loop"        


And one more question how can I end a loop after say 20 seconds?

EDIT: Just tried it out works fine real smooth. You don't need to use the select 0 commands nemore. All I need now is to how to make the loop end once a time limit has expired.
« Last Edit: 11 Jul 2003, 20:06:03 by max_killer_payne »

Offline Blanco

  • Former Staff
  • ****
Re:Vehicle tracking without all that otha stuff
« Reply #1 on: 11 Jul 2003, 23:19:41 »
I don't think U can if U want it that smooth, cos delay is  0

maybe U can make it as short as possible like 0.0001
Quote
_c = 0
#loop
_cam camsettarget plane
_cam camsetrelpos [0,50,50]
_cam camcommit 0
_c = _c + 0.0001
?(_c  > 0.002) : goto "stopcam"
goto "loop"

#stopcam
_cam camsettarget... and so on...
cos 0.0001 * 20(sec) = 0.002 :)

Or run a another counterscript in your camscript and use a bolean... :-\  

Hmmm. I like to know this too...

       
Search or search or search before you ask.

max_killer_payne

  • Guest
Re:Vehicle tracking without all that otha stuff
« Reply #2 on: 11 Jul 2003, 23:25:21 »
cheers for that Blanco

Offline Blanco

  • Former Staff
  • ****
Re:Vehicle tracking without all that otha stuff
« Reply #3 on: 12 Jul 2003, 00:41:36 »
Hmm I made it difficult...it's the same but U don't need that 0.0001 thingy I think

try :
Quote
_c = 0
#loop
_cam camsettarget plane
_cam camsetrelpos [0,50,50]
_cam camcommit 0
_c = _c + 1
?(_c  > 20) : goto "stopcam"
goto "loop"

#stopcam
_cam camsettarget... and so on...

Hmmm, actually U can make it smooooth...

Search or search or search before you ask.

max_killer_payne

  • Guest
Re:Vehicle tracking without all that otha stuff
« Reply #4 on: 12 Jul 2003, 09:41:18 »
I just got up, had to get up early, wanna get me hair cut. I'll report back in a coupla hours when ive tested this all out.

Offline Blanco

  • Former Staff
  • ****
Re:Vehicle tracking without all that otha stuff
« Reply #5 on: 12 Jul 2003, 19:51:19 »
i tested it b4 u, nope doesn't work.

I must be a bit confused last night, cos I forgot the delay...

OK, new try...

Quote
_c = 0
#loop
_cam camsettarget plane
_cam camsetrelpos [0,50,50]
_cam camcommit 0.0001
_c = _c + 0.0001
?(_c  > 0.002) : goto "stopcam"
goto "loop"

#stopcam
_cam camsettarget... and so on...

or

camscript.sqs

Quote
stopcam = false
[] exec "counter.sqs"

#loop
_cam camsettarget plane
_cam camsetrelpos [0,50,50]
_cam camcommit 0
?stopcam: goto "endit"
goto "loop"

#endit
_cam camsettarget ...blablabla

run another counterscript within your camscript

counter.sqs
Quote
_c = 0

#loop
_c=_c+1
~1
?(_c == 20) : Stopcam = true
goto "loop"

Run the counterscript b4 the loop in the camscript, not in it!
When _c reach 20: stopcam = true and your loop stops in your camscript. In that way you can keep your camcommit 0
that makes it smoooth...

Sorry for the bad English, hope it helps.





« Last Edit: 12 Jul 2003, 19:53:02 by Blanco »
Search or search or search before you ask.