Page 5 of 5 FirstFirst 12345
Results 41 to 45 of 45

Thread: MultiTask - Multiplayer tasks made easy

  1. #41
    Wow, that was quick response - thanks!

    With regards to language and localization, that isn't really a major concern (yet). The main reason for using stringtables is lazy / readable editing of the task content.

    I'm probably a bit out of my depth understand the scope of variable declarations, certainly in a client/server environment. However, this said, the "assigned" creation code you quoted DOES work, whereas the simple "succeeded" code (which doesn't reference any of the highlighted _task_* variables) DOESN'T?

    However, even though I may be missing the point, you may have flicked a switch on in my head in terms of thinking about the locality and scope of variables.

    EDIT - Additional:

    Made a quick empty mockup mission in editor to test with and demo the problem (alternatively, separate files here).

    Most interestingly, using the radio triggers if you create task 1 then task 3 (alpha, charlie) they both work fine and stack up, but if you then radio bravo to 'succeed' at task 1, it will locate the correct task and make it 'successful' but just the other fields are lost.

    I think this may be what you were trying to tell me, but I cannot understand why just updating the status requires the task to recall how the other fields were constructed. Surely it just relays the command to all clients to "turn task1 green and signify it is successful"? My belief was once the Task object had been constructed using the script it is 'done' - however, is it that the Task object retains all the component strings, variables, references and such bundled up, and this is why updating it causes it to be lost like you say?

    Think I'm slowly getting there but still so very confused! Still, thanks for the pointers. Slowly the cogs in my brain are turning...
    Last edited by TangoCharlie; Feb 10 2011 at 23:07.

  2. #42
    Moderator
    Join Date
    Dec 5 2006
    Location
    Prague
    Posts
    2,731
    Author of the Thread
    I am working on a new version that will employ much less call compile format's, I will help you out with your trouble once it's out (should be later today).

  3. #43
    Oh, excellent, appreciated. I hope I haven't unnecessarily made you update the script on my account.

    EDIT: Fixed! After a brainwave when digesting the above ramblings, I came to realise that upon re-commit'ing a task, it will re-parse the entirety of the task including all text, not just the changes. And it would seem it retains all the referenced variable names, so hence upon running my "successful" 'if' statement it no longer held any record of those strings. Simply by moving the string-table -> var statements to the top of the script, the taskState and taskCommit was able to rebuild the tasks and sync them in their entirety with all the expected text. Thanks for nudging me along in the right direction.
    Last edited by TangoCharlie; Feb 12 2011 at 19:33.

  4. #44
    Moderator
    Join Date
    Dec 5 2006
    Location
    Prague
    Posts
    2,731
    Author of the Thread
    MultiTask v0.2.1 released.

    Attention, all global variables have been re-tagged from DFS_ to A2S_
    Attention #2, instead of using "string of code" it now uses code directly


    For example:
    Code:
    ["TAG_task_retreat", """Retreat"""] call DFS_createSimpleTask;
    Now has to be:
    Code:
    ["TAG_task_retreat", {"Retreat"}] call A2S_createSimpleTask;

  5. #45

    Post LazyTasks 1.2

    Thanks for the update Deadfast, nice work!

    To aid my own laziness with the development of a few new multiplayer missions, I have finished developing my LazyTasks script. If you don't mind, I have linked below a link to the script.

    LazyTasks, for MultiTask
    ================


    If anyone else is looking for simple and/or lazy creation of tasks with one line of code, this might interest you. I figure this might be of use for amateur mission makers or scripters looking to use tasks with the minimal of fuss. It eliminates the need to get involved with all the complexities of the code and the various tasks commands.

    Particularly, a certain individual who derailed this thread and had a fit of frustraton may be the ideal target audience...
    Code:
    LAZY TASKS script
    =================
    - An easy 'MultiTask' handler for quick and lazy task management in m/p or s/p.
    - This script by TC. Heavily dependant on the MultiTask code by Deadfast.
    - v1.2, 19th Feb 2011
    
    
    * Who is this script for and what does it do?
    ---------------------------------------------
    - It allows for the super easy creation, assignment and update of tasks.
    - Requires no knowledge of the various separate BIS or MultiTask commands.
    - Simple one-line call to the script for all task commands.
    - Uses the power of Multitask to make tasks sync in multiplayer & JIP.
    - No expertise required with arma scripting - can be called from the editor.
    - Task information is stored in the stringtable for easy content editing.
    For example, using the script you can type out your task information in the stringtable file using your favourite text editor and then with ONE command:
    Code:
    * Create a fully featured task:
    [1, "rescuers", "Assigned", true, true] execVM "LazyTasks.sqf";
    
       - Create a new "assigned" Task1 for the "rescuers" squad
       (which includes full description, title, hint, map marker and caption),
       will set it as the current task, and fire an additional hint popup.
    
    * Update a task:
    [1, "rescuers", "Succeeded"] execVM "LazyTasks.sqf";
    
       - Update Task1 as "succeeded" for the "rescuers" squad.
    Further / full information can be found in the README (click).
    Included are full installation and usage instructions, which I have tried to keep as simple as possible.

    You can DOWNLOAD the script here (click). The RAR file includes the Readme, LazyTasks 1.2, MultiTask 0.2.1, 'example use' file, an example stringtable.csv and a very basic example mission demonstrating it's use (LazyTask-Example.Takistan).

    This may seem pretty pointless for advanced users happy to manually code in all the task information, I wont deny. But if you are phased by complex scripting or if you have a LOT of tasks (as does one of my current projects), this may make life that little bit easier.
    Last edited by TangoCharlie; Feb 19 2011 at 01:10. Reason: v1.2 released

Page 5 of 5 FirstFirst 12345

Posting Permissions

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