Home   Help Search Login Register  

Author Topic: Scripting problem  (Read 527 times)

0 Members and 1 Guest are viewing this topic.

Peter haroski

  • Guest
Scripting problem
« on: 08 Aug 2004, 11:19:06 »
I know how to use camera scripting, but I have one question, what was the command, if I want to hear music, examble Organ works, when camera gets to rigt position, and how I put text to the script, and how I should write that setacctime 100

this is part of my script

_camera = "camera" camCreate [0,0,0]

_camera cameraeffect ["internal", "back"]
;=== 11:45:44
_camera camSetTarget [-94325.72,-3347.27,-1737.42]
_camera camSetPos [5177.28,6310.10,29.40]
_camera camSetFOV 0.985
_camera camCommit 0
@camCommitted _camera

titletext ["Peter Haroski production"]   is this even near right?

~1

;=== 11:48:56
_camera camSetTarget [-93417.42,20821.81,-8991.87]
_camera camSetPos [5047.69,6299.37,2.11]
_camera camSetFOV 0.955
_camera camCommit 5
@camCommitted _camera

_setacctime 100 no idea about this
_play music ???????? how I should do this
Plz help.
« Last Edit: 08 Aug 2004, 11:19:42 by Peter haroski »

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Scripting problem
« Reply #1 on: 08 Aug 2004, 13:55:05 »
I think the command is playMusic, but I have yet to figure out how to reference the music I want played.  The way I now do it is set a variable eg:

MusicOn = true

at the relevant point in the script.  In the mission I have a trigger that activates when MusicOn is true and this trigger plays the music.

Very inelegant but it works.
« Last Edit: 08 Aug 2004, 14:03:33 by THobson »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Scripting problem
« Reply #2 on: 08 Aug 2004, 15:50:02 »
playMusic name

Operand types:
name: String
Type of returned value:
Nothing
Description:
Play music defined in description.ext.

Example:
playMusic "musicname"


The music file must be in the Music subfolder in the mission folder.   Read Bloodmixer's sound tutorial in the Ed Depot.
Plenty of reviewed ArmA missions for you to play

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Scripting problem
« Reply #3 on: 08 Aug 2004, 16:40:02 »
Quote
The music file must be in the Music subfolder in the mission folder.
Correct/Incorrect.

When playing custom music, yes, it needs to be in the music folder and defined in the description.ext...

But when using the 'in-game' music, you just need to know the name of the 'song'.
The name of the song is not the same as in the list of a trigger.
If I remember correctly they can be found in the config.cpp, but you can also get the name by putting a trigger on the map and setting it to play the music you want, name the trigger, save and then open the mission.sqm and look up the trigger from there (the name comes handy in this part) and see what it has as name of the music...

Here's the Organ Works for example:
      
       class Item0
                   {
         position[]={9264.431641,10.576627,3433.409912};
         age="UNKNOWN";
         name="which_music";
         class Effects
         {
            track="Frost";
         };
      };
   };


The setAccTime works like any other scripting command.
setAccTime 1

If you use setAccTime 100 it makes the scene run 100 x the normal speed, and also the scripts tries to run at the same speed...
setAccTime above 1 faster than normal,and below 1 slower than normal...
So, 1 is the normal speed...
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Peter haroski

  • Guest
Re:Scripting problem
« Reply #4 on: 08 Aug 2004, 16:52:29 »
I just  wanted extra speed to the mission, thank you quys  :thumbsup: