Advertisement
NovaYoshi

wip tilemap town api

Dec 4th, 2017
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. ---- Utility stuff ----
  2. contains(array, value)
  3. Returns true if array has a given value in it.
  4.  
  5. index_of(array, value)
  6. Index of value in array.
  7.  
  8. len(value)
  9. Returns string length or array length.
  10.  
  11. ---- Map manipulation / information ----
  12. map_owner()
  13. Returns name of map owner.
  14.  
  15. map_width()
  16. map_height()
  17. Returns dimensions of map.
  18.  
  19. density(type)
  20. Returns the density (true/false) of a tile or obj.
  21.  
  22. tile_get(x,y)
  23. tile_put(x,y,type)
  24. Gets/sets the tile type at x,y.
  25.  
  26. obj_get(x,y)
  27. obj_put(x,y,list)
  28. Gets/sets the list of the obj types at x,y.
  29.  
  30. ---- Player information ----
  31. player_get(player, key)
  32. player_set(player, key, value)
  33. Get/store per-player saved information.
  34. Saved between map visits.
  35.  
  36. player_displayname(player)
  37. Returns display name of the player.
  38.  
  39. player_x(player)
  40. player_y(player)
  41. Position of player.
  42.  
  43. player_move(player, x, y)
  44. Move player to a new position.
  45.  
  46. player_here(player)
  47. Returns true if player is on the map.
  48.  
  49. player_who()
  50. Returns a list of the currently present players.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement