Jump to content

SimonP

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by SimonP

  1. 2 hours ago, mjt said:

    All commands are send off immediately one after the other - wait commands make the script wait.

    So if you instruct a brush to move for 2 seconds, and have a 5 sec wait command after it, the brush starts moving as soon as the wait starts counting. So the wait arrives at 2s when the brush reaches final position, leaving you off with 3 more seconds of wait till the next brush movement is send off with another wait.

    Thanks for the clarification, that makes sense now, I wrongly assumed the commands were blocking.

     

    2 hours ago, mjt said:

    On the other example - the one about tasks and loops - this really looks like a mistake to me. I think what they intended to convey was to define a task that uses parms exclusively outside the loop once, and call it inside the loop as dowait or do instruction.

    Using parms / variables can help you write better universal scripts that can be reused on many entites throughout a level. But for basic stuff it's not really relevant too much.


    What are you cooking up though? 🙂

    Yes, I understood the reasoning behind the use of the entity param variables to make generic scripts - nice to see such depth of explanation in the docs 🙂

    Re what I'm doing - pondering procedural level generation (with a Star Wars theme of course). I was actually looking to see whether there were e.g. Python hooks into GtkRadiant (as I thought that generating archetypal "buildings" might be a good first goal) but then got sidetracked reading the scripting docs, which is fine, I need to understand how scripting refers to the objects/entities even if I expect to initially just copy the logic from existing scripts in the game levels/SDK.

  2. Hi,

    I've been reading about ICARUS scripting on the wiki, I realise I could probably "correct" these things that I think are mistakes myself (as it's a wiki), but thought I should actually confirm I'd not misunderstood what I'm reading. Perhaps this would be better as a GitHub Issue, dunno.

    FWIW it is wonderful to have such nice documentation, so my thanks to the authors and my comments here are simply to make it better/clarify if I've misunderstood 🙂

     

    Anyway, onwards:

    The Wiki page in question is here: https://github.com/JACoders/OpenJK/wiki/ICARUS-Scripting

    The things I've spotted are:

     

    In this section (https://github.com/JACoders/OpenJK/wiki/ICARUS-Scripting#brush-manipulation-commands) it says "This code will put the affected entity on a constant motion between (0,0,0) and (0,0,100), each move taking 2 seconds, with 3 second stops.", however it looks like it actually has 5s (5000ms stops). The same is true for the example code above and below the quoted text.

     

    In this section (https://github.com/JACoders/OpenJK/wiki/ICARUS-Scripting#set-command), the Tasks in the two examples are declared inside the Loop( -1 ) loops, which it's stated earlier in the document (https://github.com/JACoders/OpenJK/wiki/ICARUS-Scripting#tasks) is not what one should do, as you only need to declare a task once. I also think these examples are probably non-functional as there's no dowait() to actually run the tasks - i.e. tasks should be declared outside the Loop(){ } and have the dowait() commands within.

     

×
×
  • Create New...