Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Objectives and mission Peramiters

  1. #1

    Objectives and mission Peramiters

    I have looked around now for a few weeks i haven't found any posts on the two matters.

    1) I trying to creat Objectives (target areas) that Evo has in it. Shows a dark circle of that area and only one shows at a time. Is there some type of script I need, markers, triggers??? I dont have a clue how to do this.

    2) I am also trying to set mission peramiters such as the time of day. I put the peramiters in the descriptions it shows up in the missions options but it dosent change the time ingame. What do I need to do there?

    Thanks for any, and all help in advance.

  2. #2
    1-

    Easiest way is to create the red circled marker in the area you wish (switching from Icon to Ellipse/Rectangle).

    For example name it Marker_Enemy.

    Create a trigger with Opfor and Not Present, in the on act put

    "Marker_Enemy" setMarkerAlpha 0;

    This removes the marker when there is no enemy present.

    If you want it to turn green rather than just disappear, create a second marker called Marker_Safe, and create the line;

    "Marker_Safe" setMarkerAlpha 0;

    in your init.sqf (This means when a player starts, the green one is invisible and the red one visible on start).

    Now, add also "Marker_Safe" setMarkerAlpha 1; into the On Act of your Trigger Opfor Not Present.

    When there is no enemies left in that area, Green will turn to Red. You can use any condition really !alive UnitName etc.

    2 I can't help you with coz I haven't looked into parameters myself.

  3. #3
    Lance Corporal tuocs's Avatar
    Join Date
    Nov 11 2009
    Location
    Fort Lewis
    Posts
    55
    Author of the Thread
    Thanks for your help Nemorz. I'm not sure I under stand how to end the trigger. I'm trying to get the trigger to end when all Opfor is dead. I have the opfor name (to end the trigger) on only one soldier so as you know once that soldier is killed objective marker disapears although not all of the Opfor are dead or destroyed. Right now I got as follows.

    1: I have Opfor units placed.

    2: Marker Status

    Name: Marker_ Enemy
    Shape: Ellipse
    Axis A: 300
    Axis B: 300

    3: Trigger Status

    Activation: Opfor
    Not Present
    Type: None
    Condition !(alive Opfor) (NOTE: I have the opfor name on only one soldier so as you know once that soldier is killed objective marker disapears)
    On Act: "Marker_Enemy" setMarkerAlpha 0;

    4: I have nothing in my init.sqf

    Is there a script that I need to do this? I know what I'm trying to do is have only one trigger show at a time (moving the trigger from one place to another) with no other enemy on the map besides at the one trigger area at a time. From what I have seen on evo no emeny is seen on the map in the trigger areas (in the editor). No other ememy on the map besides that trigger area and only show one trigger area at a time (while in game).
    Last edited by tuocs; Nov 14 2009 at 20:05.

  4. #4
    You probably need to look into http://community.bistudio.com/wiki/createTrigger

    Add that to your On Act conditions then a new trigger will be created (and rather than try to move one which I don't think is possible, when one trigger is on "Once" as opposed to repeatedly, it's automatically dead). Using createTrigger you can create new ones anywhere after conditions are met.

    As for no enemy on the map in editor, that's because he puts them in dynamically via script, i.e. when the trigger is touched off, it will spawn those units via script. I haven't looked into his method, but createUnit is a good start (look into wiki).

    It's also possible to spawn units with x,y,z properties i.e. you go into the editor, take your player character to where you want them to spawn and find those co-ordinates. There was a nifty little Radio Command to show x,y,z where you stand for that.

    Create a new Trigger, Radio Alpha, Repeatedly and put this in the On Act:

    hint format [""%1"", getPos player]

    Now when you go to that position, and press that radio trigger, it'll give you x,y,z coordinates.

    For ensuring no enemy remains after a trigger has ended you can use:

    {deleteVehicle _x} forEach (units GroupNameHere);
    deleteVehicle VehicleName;

    Into another script run from the On Act of a trigger Condition being met.

    Dunno if all of this makes much sense or is even what you're after, but hey, I'm trying

  5. #5
    Lance Corporal tuocs's Avatar
    Join Date
    Nov 11 2009
    Location
    Fort Lewis
    Posts
    55
    Author of the Thread
    Create a new Trigger, Radio Alpha, Repeatedly and put this in the On Act:

    hint format [""%1"", getPos player]

    Now when you go to that position, and press that radio trigger, it'll give you x,y,z coordinates.
    Its giving my an error saying I'm missing a ]

    I do thank you for you help Nemorz! I am the type that needs an example lol. If you could can you give me an example of how the trigger script should look? On the examples I have found on this topic they don't go in enought depth for me.

    Example :
    _trg=createTrigger["EmptyDetector",getPos player];
    _trg setTriggerArea[5,5,0,false];
    _trg setTriggerActivation["CIV","PRESENT",true];
    _trg setTriggerStatements["this", "hint 'Civilian near player'", "hint 'no civilian near'"];
    As I look at this I become more lost on a few things.
    1) Where does the x,y,z go?
    2) Where do I put Ellipse or Rectangle?
    3) The Condition?
    4) On Act?
    5) Once or Repatedly?
    6) Is there somewhere I put the name of the trigger so it works with the marked to disapear when cleared of opfor?
    7) What would I title this script to save it?
    8) Is there some init line I need to put in the init.sqf?
    9) Could I add the the triggers on one script or do they need to be set apart form one another?

    Maybe its all there I'm just not understanding. Sorry for all the questions. Please bare with me I'm currently in Iraq and the internet here is worthless so trying to search for stuff is hard, and time consuming.
    Last edited by tuocs; Nov 19 2009 at 01:43.

  6. #6
    Code:
    hint format ["%1", getPos player]
    I took the code from my mission.sqm coz I was busy on another map at the time (and the map it's in has a shedload of addons lol). It added a couple of quotation marks in mission.sqm. My bad!

    1. Heres an excerpt I have in an init.sqf to spawn stuff (on start, although you can spawn them through trigger too)

    Code:
    One = "TargetPopUpTarget" createVehicleLocal [4224.5923,10778.191,339];
    The [4224.5923,10778.191,339] being the co-ordinates. (x,y,z).
    As was pointed out to me, if you ever extract co-ordinates from mission.sqm, that will read (x,z,y). Worth bearing that in mind.

    2. Ellipse/Rectangle is just the "shape" of the trigger. setTriggerArea I think is used for defining size and shape. Again, never used createTrigger just read about it so you would probably have to test.

    3&4. setTriggerStatements (it's all there on the wiki)

    5. setTriggerActivation

    Code:
    trigger setTriggerActivation [by, type, repeating]
    The last part of the array, replace "repeating" with true, for repeating or false, for once only.

    6. Not sure
    7. Title it whatever you like, so long as you can called it. "Createmytrigger.sqf" for example, as long as you know it's name and it's in the missions folder.
    8. Not sure what you mean by init line, but init.sqf should always be run automatically when player joins or dies.
    9. You should be able to add them all to one script, but that's where I lose interest because it gets more complex being able to call single items when all items are in one script. For starting out, I suggest creating as many individual scripts as you need and call them individually.



    Btw, I don't mind, I've had alot of help from others here and despite having little knowledge myself I'll help out where I can.

  7. #7
    Lance Corporal tuocs's Avatar
    Join Date
    Nov 11 2009
    Location
    Fort Lewis
    Posts
    55
    Author of the Thread
    I thank you for the help. I test stuff and see what I can come up with. If I have more questions I'll ask. however a new topic How would the script go for a trigger i guess it would be to the opfor witn the objective/ marker area? I seen an example from murray editor guide go somehing like this

    Using with groups:
    Furthermore it’s possible to generate whole groups instead of single units. These units
    can be renamed individually if one wants to define special things to them later. The
    following script is used as an example only. In this script a group will be generated at the
    position of the marker "GrpOneM". That marker has already been placed on the map.

    GrpOne = Creategroup EAST;
    _Leader="SquadLeaderE" createUnit [getMarkerPos "GrpOneM", GrpOne, "", 1, "Sergant"];
    _Unit2="SoldierEB" createUnit [getMarkerPos "GrpOneM", GrpOne, "", 1, "Corporal"];
    _Unit3="SoldierEB" createUnit [getMarkerPos "GrpOneM", GrpOne, "", 1, "Corporal"];
    _Unit4="SoldierEG" createUnit [getMarkerPos "GrpOneM", GrpOne, "", 1, "Corporal"];
    _Unit5="SoldierEMG" createUnit [getMarkerPos "GrpOneM", GrpOne, "", 1, "Corporal"];
    _Unit6="SoldierEAT" createUnit [getMarkerPos "GrpOneM", GrpOne, "", 1, "Corporal"];
    _Unit7="SoldierESniper" createUnit [getMarkerPos "GrpOneM", GrpOne, "", 1, "Corporal"];
    exit

    As one can see, the first unit gets renamed as leader and she also is allocated a higher
    rank. This unit will be the leader of the group. The name of the whole group is "GrpOne"
    as well. To make sure that this group works correctly, read the following paragraph
    carefully.
    Notice:
    If soldiers of one side are to be generate while the mission is already running and no unit
    of the respective side has already been placed, it’s important to allocate a center to this
    side to make sure that these units can communicate with each other. Then the setFriend
    order has to be used and the both sides needs to become enemy's to each other.
    Otherwise the AI wouldn’t start shooting the enemy side. It’s necessary to define the
    setFriend order and the center within the init.sqs script. If one has already placed units
    from all parties on the map, then these centers will be generated by the engine
    automatically. In the following example you can get the entries for the example Init.sqs:

    Init.sqs
    Createcenter EAST
    Createcenter WEST
    WEST setFriend [EAST,0]
    EAST setFriend [WEST,0]

    Center
    As how Center can be created, it can be deleted again by using deleteCenter SIDE. But that
    would be unnecessary.
    I tryed that example in my mission editor I didnt have any luck. Do I need some sort of line to go in my init.sqf? do I need to save the script under a spacific name?
    Last edited by tuocs; Nov 19 2009 at 03:47.

  8. #8
    For center, I generally just place an enemy unit on one of the outlying islands somewhere, then when you use the createUnit command it works no problem for me. It's only when there are no enemies in the map it won't work.

    Code:
    // Spawn my Group
    
    GroupSquad1 = CreateGroup East;
    _leader = GroupSquad1 createUnit ["RU_Soldier_SL", [(getMarkerPos "Squad1") select 0,(getMarkerPos "Squad1") select 1,0], [], 3, "FORM"];
    _unit = GroupSquad1 createUnit ["RU_Soldier_MG", [(getMarkerPos "Squad1") select 0,(getMarkerPos "Squad1") select 1,0], [], 3, "FORM"];
    _unit = GroupSquad1 createUnit ["RU_Soldier", [(getMarkerPos "Squad1") select 0,(getMarkerPos "Squad1") select 1,0], [], 3, "FORM"];
    _unit = GroupSquad1 createUnit ["RU_SoldierT", [(getMarkerPos "Squad1") select 0,(getMarkerPos "Squad1") select 1,0], [], 3, "FORM"];
    _unit = GroupSquad1 createUnit ["RU_Soldier_Marksman", [(getMarkerPos "Squad1") select 0,(getMarkerPos "Squad1") select 1,0], [], 3, "FORM"];
    _unit = GroupSquad1 createUnit ["RU_Soldier_MG", [(getMarkerPos "Squad1") select 0,(getMarkerPos "Squad1") select 1,0], [], 3, "FORM"];
    _unit = GroupSquad1 createUnit ["RU_Soldier", [(getMarkerPos "Squad1") select 0,(getMarkerPos "Squad1") select 1,0], [], 3, "FORM"];
    _unit = GroupSquad1 createUnit ["RU_Soldier", [(getMarkerPos "Squad1") select 0,(getMarkerPos "Squad1") select 1,0], [], 3, "FORM"];
    _unit = GroupSquad1 createUnit ["RU_Soldier_AR", [(getMarkerPos "Squad1") select 0,(getMarkerPos "Squad1") select 1,0], [], 3, "FORM"];
    _unit = GroupSquad1 createUnit ["RU_Soldier", [(getMarkerPos "Squad1") select 0,(getMarkerPos "Squad1") select 1,0], [], 3, "FORM"];
    _leader = leader GroupSquad1;
    wp1 = GroupSquad1 addwaypoint [position SquadAttack, 0];
    wp1 setwaypointtype "MOVE";
    The above code spawns that particular group at a Marker called "Squad1"

    wp1 sets up a waypoint, and their waypoint is set on another Marker named "SquadAttack".

    With the waypoints theres a few more commands you can use to set their alertness (Safe, Careless, Combat etc) if you look it up somewhere. The "FORM" area is where you put "NONE", "FLY", "FORM" etc. And "RU_Soldier" defines the type of unit to be placed.

    _leader defines which of the units is going to be in charge of the group.

  9. #9
    Lance Corporal tuocs's Avatar
    Join Date
    Nov 11 2009
    Location
    Fort Lewis
    Posts
    55
    Author of the Thread
    Okay this is what I got still no luck. I know I'm doing something wrong or missing something.

    I have a marker placed named Chernogorsk

    Code:
    Chernogorsk.sqf
    _trg creatTrigger[EmptyDetector",6738045,2473.83,0.0013628];
    _trg setTriggerArea[600,700,60,false];
    _trg setTriggerActivation["OPFOR","NOT PRESENT",false]; 
    _trg setTriggerStaements["this", "hint '"(east countside thislist) < 1","Chernogorsk'", "hint '"Chernogorsk" setMarkerAlpha 0'"]
    _trg setTriggerText["CHERNOGORSK CLEAR OF ENEMY"];
    Last edited by tuocs; Nov 19 2009 at 18:37.

  10. #10
    Maybe someone else can help you further as I've never experimented with this. However, might be worth checking the x,y,z - x,z,y thing.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •