Need Spell-Casting Help

Discussion in 'Modding and Scripting Support' started by rroyo, Mar 13, 2008.

Remove all ads!
Support Terra-Arcanum:

GOG.com

PayPal - The safer, easier way to pay online!
  1. rroyo

    rroyo Active Member

    Messages:
    3,319
    Likes Received:
    0
    Joined:
    Oct 13, 2006
    Here's what I'm trying to set up:

    {44580}{I just learned of a Cattanese halfling legend about a spider-demon called Merow Vortahm. The story goes that it is able to cloud your mind and make you believe it's actually a beautiful human woman. Posing as a woman who is lost, it comes to an isolated farm, sizes up the available food supply, then finds a dark place close by to lay her eggs. Her offspring have the same ability to charm people and have no trouble overwhelming the farm. It's just a legend, of course.}

    Starting with a Plagueish Maiden, I reset the spells to Charm and Charm Beast with no effect. It just runs in and fights you.
    But, adding this script attached to the Start Combat point, I am able to get the eye-candy effects of Charm but not the result.

    0 spells: have Attachee cast free and unresistable spell 35 (Charm) on Anyone in Group (PC and NPC, single player)

    1 remove this script

    2 return and RUN default

    Return and SKIP default had the spider just sit there and be beaten to death.

    Various combinations of the "Have Attachee cast" scripting have yielded similiar results to what is listed above but still no charm of the target.

    I am not using a maxed-out PC but a generic Level One half-elf female.

    What am I doing wrong?
     
  2. Arthgon

    Arthgon Well-Known Member

    Messages:
    2,733
    Likes Received:
    12
    Joined:
    Dec 30, 2007
    What if you try this???.

    0 spells: have Attachee cast free and unresistable spell 35 (Charm) on Anyone in Group (PC and NPC, single player)

    1 Return and SKIP default

    2 remove this script

    3 return and RUN default
     
  3. rroyo

    rroyo Active Member

    Messages:
    3,319
    Likes Received:
    0
    Joined:
    Oct 13, 2006
    Ha-Ha!!!!
    It works perfectly! Thanks a million. :)
     
  4. wayne-scales

    wayne-scales Well-Known Member

    Messages:
    1,341
    Likes Received:
    15
    Joined:
    Aug 2, 2007
    ... If anything was an intelligent post, that was.
     
  5. team a

    team a New Member

    Messages:
    580
    Likes Received:
    0
    Joined:
    May 10, 2007
    out of curiosity - how does the script ever get to line 2?
     
  6. rroyo

    rroyo Active Member

    Messages:
    3,319
    Likes Received:
    0
    Joined:
    Oct 13, 2006
    It just cycles through. Line 1 acts much like hitting the Enter key when you're typing something.
     
  7. team a

    team a New Member

    Messages:
    580
    Likes Received:
    0
    Joined:
    May 10, 2007
    I thought both RETR and RETS terminated the script. Once the script gets to line 1 and RETS, it should terminate, with the spell being cast but the attachee not entering combat. Then, when it's called again (because the attachee wants to enter combat), won't it just cast the spell a second time and terminate again at line 1, not entering combat?
     
  8. rroyo

    rroyo Active Member

    Messages:
    3,319
    Likes Received:
    0
    Joined:
    Oct 13, 2006
    That's almost what was happening before.

    In this case, the scripting is attached to the Start Combat point and acts like a heartbeat script.
    The game engine reads and executes lines 0 then 1.
    A quick check - Ah! There's more. So it does lines 2 and 3.
    Another check and finding no more instructions, stops and lets the critter return to it's normal settings.

    I hope this makes sense - this is the very edge of my current level of scripting knowledge.
     
  9. team a

    team a New Member

    Messages:
    580
    Likes Received:
    0
    Joined:
    May 10, 2007
    hey thanks, i've never heard of that before. Heatbeats don't do that, though, do they? Return to the last return rather than line 0. If so, i'm surprised any of my HB scripts have worked at all, since a few of them are pretty long.
     
  10. rroyo

    rroyo Active Member

    Messages:
    3,319
    Likes Received:
    0
    Joined:
    Oct 13, 2006
    Actually, my calling the Start Combat script a heartbeat was wrong. The Start Combat seems to operate on a slightly different set of rules than a Heartbeat.

    Heartbeat scripts just work one chunk of info, then wait until the next cycle before doing it again or moving on to the next chunk.
    And as I recall, you have to tell it to move on. (ie: 3. goto line 5)

    Start Combat seems to read everything pretty much like I described above.
     
  11. team a

    team a New Member

    Messages:
    580
    Likes Received:
    0
    Joined:
    May 10, 2007
    Does anyone else know about any other script attachment points that resume at the last return rather than line 0? That would be much appreciated, thanks
     
Our Host!