Action Snake System TFS 1.X [Mocks]

Discussion in 'Actions, MoveEvents & TalkActions' started by imkingran, Feb 25, 2015.

  1. oualid6496

    oualid6496 Premium User Premium User

    Joined:
    Aug 24, 2014
    Messages:
    340
    Likes Received:
    53
    Best Answers:
    0
    Is it possible block people from throwing things down? Because it's possible to cheat at the moment :p (if someone throws another cake down)
    Also is it possible to make a highscore list?
     
  2. Stigma

    Stigma Support Team Support Team

    Joined:
    Feb 14, 2015
    Messages:
    4,206
    Likes Received:
    1,961
    Best Answers:
    339
    you can edit player onmoveitem and check for the topos area
    Code (Text):
    1.  
    2. function isInArea(center, rangeX, rangeY, pos)
    3.     return (pos.x >= center.x-rangeX and pos.x <= center.x+rangeX and pos.y >= center.y-rangeY and pos.y <= center.y+rangeY)
    4. end
    example:
    Code (Text):
    1.  
    2. if isinarea(snakecenter, 5, 5, toposition) then
    3. self:sendtextmessage('sorry not possible')
    4. return false
    5. end
    checks in a 5x5 square for toposition, using snakecenter as the center position
     
  3. strutZ

    strutZ Australian OT Member {AKA Beastn}

    Joined:
    Nov 16, 2014
    Messages:
    1,324
    Likes Received:
    474
    Best Answers:
    5
    its also possible to make a highscore list. just save the score to a storage then sort them
     
  4. oualid6496

    oualid6496 Premium User Premium User

    Joined:
    Aug 24, 2014
    Messages:
    340
    Likes Received:
    53
    Best Answers:
    0
    How do I do that?
     
  5. Stigma

    Stigma Support Team Support Team

    Joined:
    Feb 14, 2015
    Messages:
    4,206
    Likes Received:
    1,961
    Best Answers:
    339
    add the function to your lib and check position in onmoveitem
    if its true then return false and it wont move the item
     
  6. vine96

    vine96 New Member

    Joined:
    Nov 17, 2012
    Messages:
    24
    Likes Received:
    2
    Best Answers:
    0
    working 100% tested in tfs 1.3 otx 3.10
     
  7. klenio0

    klenio0 Member

    Joined:
    May 10, 2010
    Messages:
    80
    Likes Received:
    0
    Best Answers:
    0
    I would like to make a rank for this example event! Snake there would show the TOP 10 score?
     

Share This Page

Loading...