Home   Help Search Login Register  

Author Topic: First Camera Script  (Read 1468 times)

0 Members and 1 Guest are viewing this topic.

shadow99

  • Guest
First Camera Script
« on: 07 Jul 2004, 04:56:15 »
Yes! It's not really all that difficult, is it? Anyway, the question is, when I begin a script during the night, the camera automatically has night vision, how do I take it off?

Thanks!

Dubieman

  • Guest
Re:First Camera Script
« Reply #1 on: 07 Jul 2004, 05:15:36 »
It does?  :o
That's news to me, I'm gonna give it a whirl. :)

Though I don't have an answer to your Q.

shadow99

  • Guest
Re:First Camera Script
« Reply #2 on: 07 Jul 2004, 06:34:36 »
Okay, this is driving me complete nuts. First was the night vision problem, but now when I export this mission to single player missions, the intro camera script (intro.sqs) will NOT start.

In the intro, all you can see is a nightvision third person view of the player (Black Op).

In the preview of the intro through the mission editor, all is well, it just doesn't make sense why it doesn't work in a single player intro.

Also, I can't get the trigger to work to end the intro.

The trigger is simply default, except for:

Type: End#1
Condition: endcut

Yes, I have 'endcut' at the end of my camera script, and it doesn't even end in the preview through the mission editor.

*Scratches head*
AHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA!!!!!!!!!!!!!!!!!!!

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:First Camera Script
« Reply #3 on: 07 Jul 2004, 10:23:01 »
The nightvision is on, because the player unit in your intro has nv goggles...
Remove them and that removes that problem...

The endcut in your script needs to be endcut=true...

Can't help much if you don't actually let us see the script of yers...

You still need to execute the intro.sqs from someplace, [] exec "intro.sqs"...
It won't run automatically...
« Last Edit: 07 Jul 2004, 10:26:08 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

shadow99

  • Guest
Re:First Camera Script
« Reply #4 on: 07 Jul 2004, 10:34:56 »
Yeh, me knows I need to execute it...
Thanks for the nightvision clue though, I suspected it would be that. The only reason I haven't acted upon that assumption is because I have no idea how to take away the NV goggles. Thanks for your answers.

shadow99

  • Guest
Re:First Camera Script
« Reply #5 on: 07 Jul 2004, 10:37:44 »
Right. Remove all weapons command should do the trick...

Peter haroski

  • Guest
Re:First Camera Script
« Reply #6 on: 07 Jul 2004, 10:41:30 »
In intro, it doesn't change much if you change the "player" unit to some another unit, what doesn't have NV googles. Examble make normal soldier the player unit, it doesn't change anything dramatically.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:First Camera Script
« Reply #7 on: 07 Jul 2004, 10:41:49 »
Do have the camera created at the start of you script???
As I said, needs to see that script... ::)
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Acid

  • Guest
Re:First Camera Script
« Reply #8 on: 07 Jul 2004, 10:59:59 »
As with the others can't deduce much else without seeing the script but it sounds like the script itself simply isn't executing. What are you usign to execute the script? Have you placed it in the OnActivation field of a trigger? A units init field?

Btw i have experienced something when executing the scirpt for an intro, for some reason when i use []exec "intro.sqs" in the players init field the script doesn't execute, however if i use this exec "intro.sqs" it does work. Try that.

shadow99

  • Guest
Re:First Camera Script
« Reply #9 on: 07 Jul 2004, 11:10:00 »
Don't know what was wrong, but everything is fine now.

shadow99

  • Guest
Re:First Camera Script
« Reply #10 on: 07 Jul 2004, 11:12:19 »
I don't know Acid, I didn't get your message until after the problem was fixed because I was in the typing-post screen. But I just moved things around a bit in the intro.sqs and everything worked out. I think taking off the night vision helped, actually.

But I'll keep in mind 'this exec "intro.sqs". Thanks for that.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:First Camera Script
« Reply #11 on: 07 Jul 2004, 12:14:01 »
Oh, ok...
Good you got it sorted...

[] and this don't matter when executing a script that has nothing that is passed in it at the moment of executing..

[this] exec "script.sqs" means it's an array that executes a script, and the first element in that array is called with _variable = _this select 0

As for this exec "script.sqs" the this is passed into the script 'arrayless' so it's called in the script simply _variable = _this

So that problem when script is not executing when called with [] exec "script.sqs" is caused by something else...

You should actually be able to execute a script that has nothing passed in it with ""exec"script.sqs"...

Widely off-topic and hopefully very confusing :P ;D
« Last Edit: 07 Jul 2004, 12:36:40 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

shadow99

  • Guest
Re:First Camera Script
« Reply #12 on: 08 Jul 2004, 03:25:27 »
Accomplished, Klint.  ;)

Acid

  • Guest
Re:First Camera Script
« Reply #13 on: 09 Jul 2004, 09:06:03 »
Like i said though, that doesn't always work. I already knew about the differences of [] and this and setting variables etc etc i've been scripting ever since OFP came out, my point is simply i was saying that in the players init filed when executing an intro i've found the game sometimes won't execute the script unless you use this instead of [].

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:First Camera Script
« Reply #14 on: 10 Jul 2004, 02:56:14 »
Okay, this is driving me complete nuts. First was the night vision problem, but now when I export this mission to single player missions, the intro camera script (intro.sqs) will NOT start.

The thing to remember here is the difference between the intro section of the editor and the mission section of the editor.

In the mission section, your init.sqs will run automatically at the start of the mission.

However in the intro section, you'd need a script called initintro.sqs if you wanted to have the same effect in that situation ;)


As for the [] vs this... don't ask me. I've never had any problems with either. As far as I know, it shouldn't make a difference unless you have a condition at the start of the script which exits on condtion of an arguement or something...