Results 1 to 9 of 9

Thread: Hidden zone "Fogofwartrigger"

  1. #1
    Join Date
    May 2017
    Location
    Rocklin, CA
    Posts
    84

    Hidden zone "Fogofwartrigger"

    Can you spawn a hidden zone and then destroy it when it's no longer needed?
    Trying to figure out how to temporarily hide an object.
    Think I read something about this a while ago
    But can't find it now

  2. #2
    Yeah, it works just like any other spawnable, documented here: [url]http://berserk-games.com/knowledgebase/spawnable-objects/[/url]

    Code:
    local newZone = spawnObject({type = 'FogOfWarTrigger'})
    newZone.setPosition(...) -- etc.
    did you think about hiding the thing without a zone? Like saving its position and doing obj.setPosition({0, -5, 0}) on it or something along these lines?

  3. #3
    Join Date
    May 2017
    Location
    Rocklin, CA
    Posts
    84
    Well, my object is a player log sheet, so the owner of the object needs to see it when it's hidden.

    How do I set the color of this hidden zone to associate it with a specific player.

    Does setting the colortint do this?

  4. #4
    No, setValue does that
    Code:
    zone.setValue('Green') --> zone changed to green color
    zone.getValue()        --> 'Green'

  5. #5
    Join Date
    May 2017
    Location
    Rocklin, CA
    Posts
    84
    Wow. That wasn't obvious.
    Knowledge base doesn't mention that at all
    Thanks!
    I guess setValue/getValue has been changed from an Integer to a String
    Knowledge base doesn't mention this
    Last edited by Ajkiger1; 09-12-2017 at 04:23 PM.

  6. #6
    Instead of "spawning" it.. you can use a hidden zone scaled to 0,0,0 and placed up high out of the way or something... and then just use the script to move it and scale it. That way the zone will have a known GUID at all times as GUIDs are applied on spawn.

  7. #7
    Join Date
    May 2016
    Posts
    1,072
    I agree with tragic, if its on a set board. It is more convenient because you don't need to update your entity references, doesn't make a spawn object noise (I think it would) and doesn't take a frame to load in and setValue on (I'd have to experiment to check but my guess it it wouldn't be a perfect transition)

  8. #8
    Join Date
    May 2017
    Location
    Rocklin, CA
    Posts
    84
    Thanks for the ideas.
    I did implement a spawning solution - I noticed no spawn object noise when spawning it - the only thing I've spawned that makes no noise. I didn't worry about the GUID, I just searched for it using the tag = "Fog" and then checked the getValue for the proper color. Also, didn't have to wait a frame, spawned it and immediately setValue all in the same frame.
    I do like the scale = {0,0,0} idea though.
    Last edited by Ajkiger1; 09-15-2017 at 02:06 AM.

  9. #9
    Join Date
    May 2016
    Posts
    1,072
    Nice =) Glad it worked so cleanly for you. I also appreciate you posting your experimentation results here, saves us (or at least me) the trouble of trying it all ourselves =D

Similar Threads

  1. [SOLVED] Game Crash: When selecting "single" or "multi-player" mode
    By xV3NOMx in forum Technical Support
    Replies: 14
    Last Post: 08-31-2017, 08:35 PM
  2. "Back as Hidden" does not work for Unique Sided decks.
    By TheRaven81 in forum Bug Reports
    Replies: 7
    Last Post: 09-02-2016, 06:28 PM
  3. Single cards go to Hand Zone if tap "1".
    By Cluny in forum Suggestions
    Replies: 4
    Last Post: 03-01-2016, 11:00 AM
  4. Replies: 0
    Last Post: 01-03-2016, 01:44 PM
  5. [SOLVED] "Hidden" image suddenly appearing
    By Zorch in forum Technical Support
    Replies: 2
    Last Post: 04-02-2015, 08:12 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
  •