Action Snake System TFS 1.X [Mocks]

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

  1. Oualid

    Oualid Active Member

    Joined:
    Aug 24, 2014
    Messages:
    318
    Likes Received:
    42
    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. Static_

    Static_ Support Team Support Team

    Joined:
    Feb 14, 2015
    Messages:
    3,718
    Likes Received:
    1,641
    Best Answers:
    274
    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,310
    Likes Received:
    473
    Best Answers:
    5
    its also possible to make a highscore list. just save the score to a storage then sort them
     
  4. Oualid

    Oualid Active Member

    Joined:
    Aug 24, 2014
    Messages:
    318
    Likes Received:
    42
    Best Answers:
    0
    How do I do that?
     
  5. Static_

    Static_ Support Team Support Team

    Joined:
    Feb 14, 2015
    Messages:
    3,718
    Likes Received:
    1,641
    Best Answers:
    274
    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:
    22
    Likes Received:
    1
    Best Answers:
    0
    working 100% tested in tfs 1.3 otx 3.10
     
  7. klenio0

    klenio0 Member

    Joined:
    May 10, 2010
    Messages:
    70
    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...