Jump to content

Bart.Jan

Member
  • Content Count

    739
  • Joined

  • Last visited

  • Medals

Posts posted by Bart.Jan


  1. Create a seagul :

    </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

    _sg = "seagull" camCreate [x,y,z]

    <span id='postcolor'>

    Make a seagul to move :

    </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

    _sg camSetPos [x,y,z]

    <span id='postcolor'>

    Make a seagul to land :

    </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

    _sg camCommand "landed"

    <span id='postcolor'>


  2. </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (starstreams @ Mar. 15 2003,16:54)</td></tr><tr><td id="QUOTE">Wow it looks pretty deep man. I’m not even sure what an addEventHandler is? I’m guessing it’s some kind of built in component that requires an Acton or parameters. Either way where did start learning this? I mean is there some kind of tutorial that walks you though all the different Parameters?<span id='postcolor'>

    I'm sure there are good english scripting tutorials somewhere but I prefer czech tutorials. But generally very useful are :

    - official comref

    -Unofficial Operation Flashpoint Command Reference Manual (slightly out of date but still useful)


  3. </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (starstreams @ Mar. 14 2003,03:15)</td></tr><tr><td id="QUOTE">I don’t know how you figured that out but I wish I understood the science of scripting. I’m just glad it worked! smile.gif<span id='postcolor'>

    It's not so difficult as it looks. It's about knowledge of OFP scripting commands.

    </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

    this addEventHandler ["hit",{{_x setDamage 0} forEach [_this select 0]+crew (_this select 0)}]<span id='postcolor'>

    Immortal unit -> unit take no damage -> but unit always take damage after hit so unit (tank and its crew) must be healed after hit.

    after hit -> event handler "hit" -> addEventHandler

    healed -> setDamage 0

    helaing for tank and its crew -> forEach command

    unit (tank) -> first parameter of event "hit" : _this select 0

    crew of tank -> crew command -> crew of tank : crew (_this select 0)


  4. Or create ending trigger with 0,0 axis activated by nobody and change condition to :

    </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

    !alive soldierName

    <span id='postcolor'>


  5. You can use event handler. Just make sure tanks are in "combat" behaviour.

    Put in init field of each tank :

    </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">this addEventHandler ["hit",{{_x setDamage 0} forEach [_this select 0]+crew (_this select 0)}]<span id='postcolor'>


  6. It looks like problem with script calling. It shoud be something like :

    </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

    [player,triggerName] exec "scriptName.sqs"

    <span id='postcolor'>

    and I think you doesn't understand format yet. Even your example works.

    It shoud be :

    </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

    titleText[FORMAT["%1: wins THA RACE", name _player], "PLAIN"]<span id='postcolor'>

    In commas "  " is text that will be dislpayed. %1, %2 ... are substitutes that will be replaced by code after ""

    %1 takes first thing after "" - that is name _player in your example.

    And semi-colon ; is not needed at the end of each script line. Maybe it can be the problem.


  7. </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Grendelman @ Mar. 05 2003,18:41)</td></tr><tr><td id="QUOTE">Dikke kankerzooi man, dit is godverdomme toch niet normaal meer. Dat een kutforum als deze hoerezooi dit gewoon toelaat?<span id='postcolor'>

    Board rules :

    </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">3.Rules of Format

    §7)Write in English

    In the English part of the board write in English and in the Czech write in Czech. Try avoiding writing in any other language since the majority of the members most likely won't understand it.<span id='postcolor'>

    Give me a translation ! biggrin.gif


  8. Put whole script code into text file. Name that file "way.sqs" and put it into your mission folder

    OperationFlashpoint\Users\yourUserName\missionName\

    Then, in mission editor, put :

    </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

    [] exec "way.sqs"

    <span id='postcolor'>

    into init line of any unit.


  9. If you want to remove action from unit after first use you can use :

    </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

    (_this select 0) removeAction (_this select 2)

    <span id='postcolor'>

    in that action script.


  10. </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (IceFire @ Mar. 04 2003,03:41)</td></tr><tr><td id="QUOTE">But before I do, a few questions/comments to be sure about.

    The singular unit, and squads will all be western.   Be careful because there are several Russian squads patrolling.  I don't want him to join a Russian squad.<span id='postcolor'>

    In script all grpA,grpB..D are western groups.

    Script controls knowsabout between singular unit and leaders of A-D groups. If they meet (knowsAbout>=3) themselves then meeted sqad moves near to singular unit and then sing.unit joins them. After joining variable gotcha becames true. (It became true even if sing.unit reaches "Location A" alone).

    gotcha activates trigger(type switch) and it switch all synchronized wps to last wps (synchronized with last but one)-> and these are in "Location A"

    I presume all russian sqads are trying to kill sing. unit and not to capture it.

    The last question is answered by JAP.


  11. </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (IceFire @ Mar. 03 2003,02:16)</td></tr><tr><td id="QUOTE">2) A singular western unit will be running in a direction.   Other squads will be moving in a direction(or just standing static) that may cross paths with the first singular western unit.

    If for example "squad A" encounters the singular unit, the squad A leader will "join and lead" the singular unit, and then they will all move to a specific location on the map called "Location A".  

    If the singular unit, and "squad A" do NOT encounter eachother, the singular unit will continue to move on to "Location A". and "squad A" will move to another location, and then continue on to "Location A".

    There are OTHER squads around.   If "squad B" encounters "singular western unit", the squad will take command of singular unit, and then proceed to "Location A" just as "squad A" would.

    There will also be squad C and D.  All the same thing.

    If any squad does enounter and "joins and leads" singular unit.  All other squads immediately change course or start moving on to "Location A".

    If singular western unit makes it to "Location A" alone, all other squads will immediately start to move to "Location A" as soon as "singular western unit" gets to "Location A".

    Is this possible?

    What would I have to do?<span id='postcolor'>

    For all squads (A,B,C,D) make plain "move" wps (no "join and lead" wps). If you don't use "cycle" wp then use as the last wp "hold position". Then make another "move" wp (so cycle or hold pos. will not be the last one) and place it in "Location A".

    For singular(?) unit you need only one "move" wp in "Location A" and put into on activation line of this wp :

    </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">gotcha=true<span id='postcolor'>

    Then make script :

    _s is name of your singular unit (for example : _s=player)

    grpA,grpB,grpC,grpD are names of groups(squads) A,B,C,D (you can have any number of squads - but you must have corect wps for all of them)

    </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

    _s = singularUnit

    _groups=[grpA,grpB,grpC,grpD]

    _i=count _groups

    gotcha=false

    #again

    ~0.2

    _i=_i-1

    _grp=_groups select _i

    _ldr=leader _grp

    ?((_ldr knowsAbout _s)>=3) or (_s knowsAbout _ldr)>=3)) : goto "located"

    ?_i==0:_i=count _groups

    ?!(alive _s) or gotcha:exit

    goto "again"

    #located

    _ldr=leader _grp

    _ldr move position _s

    ~0.2

    ?!(alive _s) or gotcha:exit

    ?(_ldr distance _s)>15:goto "located"

    [_s] join _ldr

    gotcha=true

    exit

    <span id='postcolor'>

    then make trigger :

    axis 0,0; activated once by nobody; type - switch

    condition :

    </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">gotcha<span id='postcolor'>

    and synchronize it with all the last but one wps of all squads ("cycle" or "hold position" wps)

    It should work. smile.gif


  12. No, but you can use :

    </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

    ?(_this select 0) != (_this select 1):exit

    <span id='postcolor'>

    as first line of action script. Script ends when action is not used by its owner.


  13. Change creating line in script to :

    </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

    "civilian6" createunit [getpos _pos,_grp,"this addMagazine ""cz75mag"";this addWeapon ""cz75""",1,"PRIVATE"]

    <span id='postcolor'>

    Civilian is created with loaded CZ75.


  14. </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (iNeo @ Feb. 26 2003,02:11)</td></tr><tr><td id="QUOTE">Armagedon was cool too, but what did the mission maker actually use for meteors? wow.gif<span id='postcolor'>

    Armagedon is from section FUN. biggrin.gif


  15. </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (OxPecker @ Feb. 25 2003,23:58)</td></tr><tr><td id="QUOTE">Is there a script or command you could use to make MBTs and armored vehicles immune to small arms fire, so you could make realistic tank battles?

    The way it is now it's possible to take out an Abrams with a PK if you have enough ammo.<span id='postcolor'>

    And do you have enought time to destroy it with PK ?


  16. I would like introduce you 3 missions from Ruprt's fan page

    It's czech page so I post links that leads you just to download page. On that download page click on name of mission and then another download window pop-up (there is some info about mission in czech). There click on "Stahnout tuto misi" (download this mission) and download begins. There are no ads on that pages.

    1) Dark Blue World - Air skirmish with Camel fighter planes by Didymos

    2) Klip - very nice music clip (Andre Visor : Dont`Go) by Vojtoo

    3) Armagedon - falling meteors - nice visual efect by Didymos

    You don't need to know czech language for these missions.

×