Ambrosia Garden Archive
    • Walking after casting spells


      Complete Workaround (UPDATED)

      --OgreBob's Spellcasting Workaround Guide--
      --SEE MY NEXT POST FOR AN IMPORTANT UPDATE--
      Hello everyone. We all know we hate the fact that Coldstone makes the spellcaster walk to the NPC after targeting. After some experimentation, I have found an (almost) foolproof workaround. Skip to the bottom of this post to see what this system does, and the pros and cons. Here's the deal:
      You need:
      - 2 Globals, called EXACTLY: NewX and NewY, respectively.
      - 2 events, "CastBlocking" and "CastUnblocking" (Download here)
      - An animation
      - Your spell

      First, create the globals NewX and NewY.

      -Step number 1 is to make 2 events, CastBlocking and CastUnblocking. For your conveniance, I have made them available to download. CastBlocking sets all the movement tile access around the hero to "Blocked" status. CastUnblocking does the opposite.

      - Step 2: First, find the animation you are using for your hero. Go to his cast animation, and check the number of frames in one direction, and the frame delay. In my case, they were 11 frames with a delay of 1.
      - - Next, create a new animation. Every frame will be a plain white block. Set the frame delay to the same frame delay of your hero's cast animation. Now, add the white blocks for the same number of frames your hero cast animation had in one direction plus 2.
      - - In the last frame, put in a "kill myself" action. In the second to last frame, put in a "launch event" acion, and link it to the "CastUnblocking" event.

      - Step 3: Open your spell file. Go to the "Event Links" tab. and open the "cast" link. Here, put in a "Call Event", calling the CastBlocking event, and then a "Stamp Control", placing your white frame animation at (0,0).

      - Step 4: Bake at 450ş F. Let sit to cool. Yield 10 servings.

      ---------

      What it does: When the caster casts a spell, they always want to move to the selected target. I noticed that when you target an NPC that's on the other side of blocked access tiles, he doesn't move to them. What this system does is that it blocks the tiles around the hero so that he doesnt move. The animation MUST be one frame longer than the hero's cast animation, or else he will still move.

      This does NOT have any bad effects on NPCs around the hero that get caught in the blocked access tiles.

      Pros: No more running after the target when casting a spell!
      Cons: The only con of this system is that, if the hero is standing next to blocked access tiles, those tiles will end up unblocked (grr) due to the fact that coldstone wont let you check tile access status.

      Edit: If the link to download the events gives you a bunch of random text, then control-click and "Save target as..." or whatever your browser calls it.

      This post has been edited by OgreBob : 29 November 2004 - 03:42 PM

    • Couldn't you use "freeze player" instead? Not sure if it would work, I've never used it. Good idea though, hope they'll fix it in the update...

    • Well, that's kind of embarrassing... :blink:

      Shortly after I posted this I found out that, indeed, freeze player works. Ledorax beat me to posting it. So hey, no need for those complex events. Just put freeze player in CastBlocking and Defreeze player in CastUnBlocking.

      This one is ten times better, because the events are smaller and there are NO cons.

      This post has been edited by OgreBob : 24 November 2004 - 07:22 PM

    • I can see how this will work just fine for a game or plugin to which you are adding selective spells, but the only way I know to stop the player's travel in an existing game is to hold down the defend key while selecting the target. This keeps the playing character from running up to the target NPC and getting cracked on the noggin in the process. Too bad this system can't be retrofit to earlier spells. 😞 Of course there's nothing to prevent the monster NPC from running over to the playing character and beating on him as soon as you've aroused his attention.

    • I don't think you understand the issue here. The thing is, when you cast a spell that requires a single target enemy NPC, (without this system) the player would run to the target right after they used their cast animation. With this system, he doesn't. It has nothing to do with spells that have a target type of Allies, Enemies, or Caster. It also is not necessarily supposed to stop the player from being attacked by an NPC, but simply hinder him from walking where you do not want him to walk.

      EDIT: Oh I see what you mean, you mean there is no way to stop him in an EXISTING game, such as PoG. This is true, it is not meant to. It is merely meant for games being developed.

      EDIT2:

      Quote

      Of course there's nothing to prevent the monster NPC from running over to the playing character and beating on him as soon as you've aroused his attention.

      Actually, this is not the way the CS AI works. The NPC will not attack the player because of a spell or missile. In fact, he may do absolutely nothing. The only way an NPC will attack the player is if the player walks into the NPCs line of sight.

      This post has been edited by OgreBob : 24 November 2004 - 11:15 PM

    • I did understand what you were doing and I also knew you were not intending this for existing games. It is a good solution for games in development. I'd like to be able to give you some positive karma for coming up with this. 🙂

      OgreBob, on Nov 25 2004, 12:11 AM, said:

      The NPC will not attack the player because of a spell or missile. In fact, he may do absolutely nothing. The only way an NPC will attack the player is if the player walks into the NPCs line of sight.

      All well and good, but the developer would have to give the creatures a shorter line of sight than the playing character has, which I believe is usually about 10 tiles. Not to harp on what's out already, but many monsters have been created to have a line of sight greater than the player's, thus causing them to come running before the player sees them.

    • Rubber Ducky, on Nov 25 2004, 11:14 AM, said:

      I did understand what you were doing and I also knew you were not intending this for existing games. It is a good solution for games in development. I'd like to be able to give you some positive karma for coming up with this. 🙂
      All well and good, but the developer would have to give the creatures a shorter line of sight than the playing character has, which I believe is usually about 10 tiles. Not to harp on what's out already, but many monsters have been created to have a line of sight greater than the player's, thus causing them to come running before the player sees them.
      View Post

      Right... okay... I was just confused as to why you brought this stuff up I suppose. All good I guess.