Results 1 to 3 of 3

Thread: Scripting Area of Effect _ Example

  1. #1

    Scripting Area of Effect _ Example

    Here is my solution.

    A card enters play that gives the monster an area of effect. When you pick up the monster and move it, you have to move the area of effect zone as well. So first

    Card enters play, then zone is set to the monster

    Code:
    function onObjectEnterScriptingZone(zone, enter_object)
    
    -- this line keeps script errors from throwing from game camera moving into zone
    if enter_object ~= nil then
    
        if zone == getObjectFromGUID(Global.getTable('zones').zoneInjuryBoard.guid) then
          if enter_object.getName() == "Unseen Agony" then
            for _, monster in ipairs(zoneShowdown.getObjects()) do
              if monster.getName() == "Dragon King" then
                local pos = monster.getPosition()
                zoneEffect.setPosition({pos.x, pos.y, pos.z})
              end
            end
          end
        end
    end
    If you move the monster, this happens

    Code:
    function onPickUp(color, obj)
      if self.getName() == "Dragon King" then
    
        for _, card in ipairs(zoneInjuryBoard.getObjects()) do
          if card.getName() == "Unseen Agony" then
            zoneEffect.setPosition(zoneEffect_stored)
          end
        end
      end
    end
    
    function onDropped(player_color)
      if self.getName() == "Dragon King" then
        pos = self.getPosition()
        for _, card in ipairs(zoneInjuryBoard.getObjects()) do
          if card.getName() == "Unseen Agony" then
            zoneEffect.setPosition({pos.x, pos.y, pos.z})
          end
        end
      end
    end
    And finally if the card is lost, you do an onObjectLeaveScriptingZone() > then set zoneEffect to stored

    So for the applications. Whatever the effect is for whatever is in that zone can be triggered. Example for Unseen Agony > All Survivors in the zone suffer 1 damage per hit location for each -1 toughness the monster has. So when Unseen Agony triggers (by button press) a message pops up in the players color telling them they need to take this damage.

  2. #2
    so.. what dose this do? Video would be nice.
    My Boardgame uTube chan - Tragic's Table Top
    BGG Guild of BoardGame uTubers - Tube Tables

  3. #3
    Yes, I will show example

Similar Threads

  1. Button tooltip property having no effect?
    By dzikakulka in forum Scripting Bug Reports
    Replies: 4
    Last Post: 08-25-2017, 10:35 PM
  2. "Area of effect" for RPG module
    By fezziwig in forum General Discussion
    Replies: 15
    Last Post: 01-21-2017, 03:45 AM
  3. Bag particle effect
    By Unreal_Ed in forum Suggestions
    Replies: 3
    Last Post: 12-29-2016, 03:05 PM
  4. Replies: 4
    Last Post: 11-03-2016, 01:07 PM
  5. Area of Effect
    By Ghostpilot in forum General Discussion
    Replies: 1
    Last Post: 08-22-2014, 09:41 PM

Posting Permissions

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