Results 1 to 7 of 7

Thread: *Magic.scar CastOnCustom

  1. #1
    Join Date
    Mar 2007
    Location
    England
    Posts
    274
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default *Magic.scar CastOnCustom

    In the srl/srl/skill/Magic.scar file shouldnt

    SCAR Code:
    function CastOn(Spell, Monster: string; MonsterColor: Integer; Tolerance:
      Integer): Boolean;

    be

    SCAR Code:
    function CastOn(Spell, Monster: TStringArray; MonsterColor: TIntegerArray; Tolerance:
      Integer): Boolean;

    and

    SCAR Code:
    if (FindObj(x, y, Monster, MonsterColor, Tolerance)) then

    become

    SCAR Code:
    if (FindObjCustom(x, y, Monsters, MonsterColors, Tolerance)) then

    because then you would be able to cast a spell on multiple monsters in the area or if certain monsters are different colors it would attack all of them. This could be made as a new function called CastOnCustom or something.
    If there is another way of doing then please may someone tell me.

  2. #2
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I agree in the first one, although you could just change CastOn to find ObjCustom and do the same. And FindObj doesn't need any change, since it uses color and tolerance it would find the object anyways.


  3. #3
    Join Date
    Mar 2007
    Location
    England
    Posts
    274
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    No i mean if there are some of the same monsters in the area just completely diferent colors then you could put both of them or if there are a few monsters that you want to attack. with FindObj you can only find one color and one name

  4. #4
    Join Date
    May 2008
    Posts
    1,345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    FindObjCustom has arrays.

    ~Sandstorm

  5. #5
    Join Date
    Mar 2007
    Location
    England
    Posts
    274
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    so... isnt this a good idea then?

  6. #6
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    I'll add CastOnCustom. No need to change FindObj as a FindObjCustom already exists.

    Thanks.

  7. #7
    Join Date
    Mar 2007
    Location
    England
    Posts
    274
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok thanks for the help

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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