Results 1 to 4 of 4

Thread: need a bit of help with scripting

  1. #1

    Default need a bit of help with scripting

    hi

    I'm just messing around trying to script a battle and I've made my script the same as the EB ones and it CTD on the time of activation

    script below:


    script

    prepare_for_battle


    ; *********************************************************************************************
    ; Carthage - Alliance 0
    ; *********************************************************************************************

    ;Hannibal Barce
    label_unit 0 0 0 carthaginian cavalry generals bodyguard
    label_unit 0 0 1 african missile cavalry numidian
    label_unit 0 0 2 celtic cavalry brihentin
    label_unit 0 0 3 celtic cavalry brihentin1
    label_unit 0 0 4 iberian cavalry light curisii
    label_unit 0 0 5 iberian cavalry light curisii1
    label_unit 0 0 6 celtic cavalry brihentin2
    label_unit 0 0 7 celtic cavalry brihentin3
    label_unit 0 0 8 african missile cavalry numidian1


    ; *********************************************************************************************
    ; Rome - Alliance 1
    ; *********************************************************************************************

    ;Caivs
    label_unit 1 0 0 roman cavalry eqvites consvlares
    label_unit 1 0 1 roman infantry auxilia peditesextraordinarii
    label_unit 1 0 2 roman infantry auxilia peditesextraordinarii1
    label_unit 1 0 3 roman infantry polybian triarii
    label_unit 1 0 4 roman infantry polybian triarii1
    label_unit 1 0 5 roman infantry principes
    label_unit 1 0 6 roman infantry principes1
    label_unit 1 0 7 roman infantry hastati
    label_unit 1 0 8 roman infantry hastati1
    label_unit 1 0 9 roman infantry hastati2
    label_unit 1 0 10 roman infantry hastati3
    label_unit 1 0 11 roman skirmisher velites
    label_unit 1 0 12 roman skirmisher velites1
    label_unit 1 0 13 roman infantry principes2
    label_unit 1 0 14 roman infantry principes3


    ; *********************************************************************************************
    ; INITIALISATION
    ; *********************************************************************************************

    while ! I_BattleStarted ; Wait for deployment
    end_while
    ai_active_set off
    camera_restrictions_set off


    ; *********************************************************************************************


    while I_InBattle

    if I_LocalFaction seleucid

    battle_wait 100
    release_unit carthaginian cavalry generals bodyguard
    release_unit african missile cavalry numidian
    release_unit celtic cavalry brihentin
    release_unit celtic cavalry brihentin1
    release_unit iberian cavalry light curisii
    release_unit iberian cavalry light curisii1
    release_unit celtic cavalry brihentin2
    release_unit celtic cavalry brihentin3
    release_unit african missile cavalry numidian1



    end_if




    if I_LocalFaction egypt

    battle_wait 100

    release_unit roman cavalry eqvites consvlares
    release_unit roman infantry auxilia peditesextraordinarii
    release_unit roman infantry auxilia peditesextraordinarii1
    release_unit roman infantry polybian triarii
    release_unit roman infantry polybian triarii1
    release_unit roman infantry principes
    release_unit roman infantry principes1
    release_unit roman infantry hastati
    release_unit roman infantry hastati1
    release_unit roman infantry hastati2
    release_unit roman infantry hastati3
    release_unit roman skirmisher velites
    release_unit roman skirmisher velites1
    release_unit roman infantry principes2
    release_unit roman infantry principes3


    end_if


    end_while

    end_script

    I've also put in the bit at the bottom of the descr-battle

    does anyone know what I'm doing wrong or might be up

    any help would be much appreciated

  2. #2
    EBII Bricklayer Member V.T. Marvin's Avatar
    Join Date
    Aug 2007
    Location
    Directing the defence of Boiotergion
    Posts
    3,361

    Default Re: need a bit of help with scripting

    I do know next to nothing about scripting battles, but I have noticed that there might be an unwanted exclamation mark in the code line just after the "initialization" asterixes:

    while ! I_BattleStarted ; Wait for deployment

    this could be the cause of your problem, otherwise I do not know.
    Last edited by V.T. Marvin; 07-29-2008 at 10:18.

  3. #3

    Default Re: need a bit of help with scripting

    Ah I guess you tried to use the logical negation operator? Usually it's !, I know but in this case (RTW scripting doesn't feature non-binary operators AFAIK, and the negation operator is unary) it should be the function not.
    Last edited by Tellos Athenaios; 07-29-2008 at 13:27.
    - Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool - EB Install Guide - How to track down loading CTD's - EB 1.1 Maps thread


    ὁ δ᾽ ἠλίθιος ὣσπερ πρόβατον βῆ βῆ λέγων βαδίζει” – Kratinos in Dionysalexandros.

  4. #4

    Default Re: need a bit of help with scripting

    first of all sorry for not posting back sooner something came up and I've been away for a few days


    Quote: Ah I guess you tried to use the logical negation operator? Usually it's !, I know but in this case (RTW scripting doesn't feature non-binary operators AFAIK, and the negation operator is unary) it should be the function not.

    logical negation operator - not sure what you mean by this, is it a modding helping tool?

    and I've tried the ! in the scripting but still CTDs

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO