Home   Help Search Login Register  

Author Topic: Begginers questions :)  (Read 4763 times)

0 Members and 2 Guests are viewing this topic.

Offline noobefier

  • Members
  • *
Begginers questions :)
« on: 25 Jul 2007, 09:46:02 »
Hello.
I recently started learning about ArmA scripting, and I have a little problem. I know that script files are saved in the mission's folder and are included in it when it's compiled, but how do I actually use the scripts? What I mean is, if I have two scripts I want to use, do I need 2 files and in the editor I just call the script "file1" and "file2"? Or can I have multiple functions in one file and use them? If so, how do I do that and how do I define separate functions?

Thanks :)

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re: Begginers questions :)
« Reply #1 on: 25 Jul 2007, 11:22:29 »
each script (or funky function) is a seperate file dat u put inside da mision folder :D 2 cal em u use da next lines

4 a script

variabels exec "sriptname.sqs"

both italic parts change depending on script... instead of variabels u shud put any tvari dat da script 2 takes... and scriptname is prety much self explanitory :P

as 4 da functions part its basicly da same... if u want 2 use em regular use, just put

variabels execVM "sriptname.sqf"

there is other wayz but dit is a long explanation som1 else already done...

nywayz da Tuts section in dis very same site wil get u nything u want... just pick up ny of da begginers guides :D

noder kool tings is da search function 4 da forums.. will get u probably all da easy stuff u need (search da OFP boards also as basicly ArmA n OFP basic editing is da same)

also 4 functions in ArmA read dis TUT writen by my boss cheetah :P ;)

*looks above :  :blink:

wow i wrote 2 much :D

so last ting im gonna say is

WELCOME 2 OFPEC M8

and have fun in ur stay here :D ;)

LCD OUT

 
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Begginers questions :)
« Reply #2 on: 25 Jul 2007, 11:24:21 »
Just tell me if you need help translating LDC's post  :P

Wellcome.

Offline noobefier

  • Members
  • *
Re: Begginers questions :)
« Reply #3 on: 25 Jul 2007, 11:27:48 »
Thanks :D

Okay, I did that and it worked, but now I ran into another problem. I can execute a script/function through a waypoint, but it doesn't seem to work with triggers. For example, when the player/team/whoever enters the trigger radius, I want it to run a .sqf file. (On Activation, that is)

How do I do that? exec/execVM "script.sqf" doesn't seem to work on triggers. :blink:

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re: Begginers questions :)
« Reply #4 on: 25 Jul 2007, 11:30:32 »
dats LCD :P

and mandoble.... y dont u write a spcial LCD translator function ??? :P

@noobefier

did u put da variables in dere ? (if deres no variables use [] execvm"scriptname.sqf")

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline noobefier

  • Members
  • *
Re: Begginers questions :)
« Reply #5 on: 25 Jul 2007, 11:32:52 »
Ah, I see. Thanks again :D

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re: Begginers questions :)
« Reply #6 on: 25 Jul 2007, 11:36:06 »
problem solved ???

edit ur 1st post and add SOLVED : 2 da title just b4 ur thread name :D

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline noobefier

  • Members
  • *
Re: Begginers questions :)
« Reply #7 on: 25 Jul 2007, 14:22:47 »
Not just yet. I have a lot of problems poping up all the time ;)

Okay, new problem. I tried to come up with a briefing.. I copied the BAS f thing and used their briefing file. The problem is, it shows the objectives of all the sides, and not the one the player is on. :blink:

Here it is:

Code: [Select]
<! --- ----------------------------->
<! --- PLAN - BLUFOR              -->
<! --- ----------------------------->

<h2><a name="plan.west"></a>Plan</h2>
<h4><p>
<br>
*** Insert BLUFOR mission briefing here. Two examples of marker links are: <a href="marker:mkrInsertion">insertion point</a> and <a href="marker:mkrExtraction">extraction point</a>. ***
</p></h4>
<hr>

<h4><p><a name = "OBJ_1"></a>*** Insert BLUFOR objective #1 here. ***</p></h4>
<hr>

<h4><p><a name = "OBJ_2"></a>*** Insert BLUFOR objective #2 here. ***</p></h4>
<hr>

<h4><p><a name = "OBJ_3"></a>*** Insert BLUFOR objective #3 here. ***</p></h4>
<hr>

<! --- ----------------------------->
<! --- End of PLAN - BLUFOR       -->
<! --- ----------------------------->


<! --- ----------------------------->
<! --- PLAN - RESISTANCE          -->
<! --- ----------------------------->

<h2><a name="plan.guerrila"></a>Plan</h2>
<h4><p>
<br>
*** Insert Resistance mission briefing here. Two examples of marker links are: <a href="marker:mkrInsertion">insertion point</a> and <a href="marker:mkrExtraction">extraction point</a>. ***
</p></h4>
<hr>

<h4><p><a name = "OBJ_13"></a>*** Insert Resistance objective #1 here. ***</p></h4>
<hr>

<h4><p><a name = "OBJ_14"></a>*** Insert Resistance objective #2 here. ***</p></h4>
<hr>

<h4><p><a name = "OBJ_15"></a>*** Insert Resistance objective #3 here. ***</p></h4>
<hr>

<! --- ----------------------------->
<! --- End of PLAN - RESISTANCE   -->
<! --- ----------------------------->

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Begginers questions :)
« Reply #8 on: 25 Jul 2007, 14:39:36 »
<p><a name = "OBJ_WEST_1"></a> blah blah blah

<p><a name = "OBJ_EAST_1"></a> blah blah blah

Inside your mission these objectives would be "WEST_1" and "EAST_1" respectively.
If all this will be MP related, tell me to move this to MP board.

Offline noobefier

  • Members
  • *
Re: Begginers questions :)
« Reply #9 on: 25 Jul 2007, 14:55:09 »
Doesn't work. :(
The BLUFOR still see all objectives, and resistance sees only resistance and civilian. ???

This is gonig to be an MP mission eventually, yes.

Code: [Select]
<! --- ----------------------------->
<! --- PLAN - BLUFOR              -->
<! --- ----------------------------->

<h2><a name="plan.west"></a>Plan</h2>
<h4><p>
<br>
*** Insert BLUFOR mission briefing here. Two examples of marker links are: <a href="marker:mkrInsertion">insertion point</a> and <a href="marker:mkrExtraction">extraction point</a>. ***
</p></h4>
<hr>

<h4><p><a name = "OBJ_WEST_1"></a>*** Insert BLUFOR objective #1 here. ***</p></h4>
<hr>

<h4><p><a name = "OBJ_WEST_2"></a>*** Insert BLUFOR objective #2 here. ***</p></h4>
<hr>

<h4><p><a name = "OBJ_WEST_3"></a>*** Insert BLUFOR objective #3 here. ***</p></h4>
<hr>

<! --- ----------------------------->
<! --- End of PLAN - BLUFOR       -->
<! --- ----------------------------->


<! --- ----------------------------->
<! --- PLAN - RESISTANCE          -->
<! --- ----------------------------->

<h2><a name="plan.guerrila"></a>Plan</h2>
<h4><p>
<br>
*** Insert Resistance mission briefing here. Two examples of marker links are: <a href="marker:mkrInsertion">insertion point</a> and <a href="marker:mkrExtraction">extraction point</a>. ***
</p></h4>
<hr>

<h4><p><a name = "OBJ_GUERRILA_1"></a>*** Insert Resistance objective #1 here. ***</p></h4>
<hr>

<h4><p><a name = "OBJ_GUERRILA_2"></a>*** Insert Resistance objective #2 here. ***</p></h4>
<hr>

<h4><p><a name = "OBJ_GUERRILA_3"></a>*** Insert Resistance objective #3 here. ***</p></h4>
<hr>

<! --- ----------------------------->
<! --- End of PLAN - RESISTANCE   -->
<! --- ----------------------------->

Offline noobefier

  • Members
  • *
Re: Begginers questions :)
« Reply #10 on: 26 Jul 2007, 10:12:02 »
Anyone? I really don't know what to do  ???


Offline noobefier

  • Members
  • *
Re: Begginers questions :)
« Reply #11 on: 27 Jul 2007, 00:00:08 »
Bump. I still could use some help, guys and gals.  :(

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Begginers questions :)
« Reply #12 on: 27 Jul 2007, 00:11:08 »
All I can say is that this works for me

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Begginers questions :)
« Reply #13 on: 27 Jul 2007, 07:21:30 »
And noobefier, do not double post.
Bumping is allowed but not in that short time frame, preferrably at least a couple of days should pass..
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline noobefier

  • Members
  • *
Re: Begginers questions :)
« Reply #14 on: 27 Jul 2007, 11:15:35 »
All I can say is that this works for me

Really? O_o
BLUFOR sees only BLUFOR objectives for you? Then why won't it do the same for me? I'm running 1.08.  :confused: