Agentperson

Walking Demo

Aug 27th, 2020 (edited)
515
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Please ask before copying code
  2. Let's make a game!
  3. name:Walking Demo
  4. desc:Click the North/East/South/West Buttons.
  5. by:AgentRylie
  6. created:22/3/2020
  7. updated:22/3/2020
  8. version:1
  9.  
  10. Settings
  11. building cost increase:100%
  12. building cost refund:100%
  13. no particles
  14. no bulk particles
  15.  
  16. Layout
  17. *main
  18. contains:log, menu, Commands
  19. header:Walking Demo (Build 33)
  20. *log
  21. contains:Log
  22. *menu
  23. contains:tag:refresh, tag:LocationADT, tag:LocationADTyh
  24. *Commands
  25. contains:tag:Prompts
  26. *store
  27. contains:shop, ownedstuff
  28. *shop
  29. contains:tag:Control, tag:LayoutThings
  30. *ownedstuff
  31. contains:tag:ACHTAG, tag:Locations, tag:Shop, tag:achieves, tag:Debug
  32.  
  33. CSS
  34. #game
  35. {
  36. background:#696969;
  37. font-size:12px;
  38. color:rgba(0,0,0,0.9);
  39. text-shadow:none;
  40. }
  41. #box-log
  42. {
  43. height:64%;
  44. width:100%;
  45. border:1px solid black;
  46. color:black;
  47. padding:3px;
  48. margin:0px;
  49. }
  50. .thing
  51. {
  52. border-radius:8px;
  53. background:rgba(192,192,192,0.5);
  54. }
  55.  
  56. .box
  57. {
  58. text-align:center;
  59. padding:0px;
  60. box-shadow:none;
  61. }
  62. .thing,.box-header,.box-footer,.box-bit
  63. {
  64. background:rgba(255,255,255,0.5);
  65. border:1px solid rgba(0,0,0,0.9);
  66. margin:1px;
  67. }
  68. .thing:hover
  69. {
  70. background:rgba(255,255,255,0.75);
  71. }
  72.  
  73. .box-header
  74. {
  75. margin-bottom:4px;
  76. }
  77. .box-footer
  78. {
  79. margin-top:4px;
  80. }
  81.  
  82. .title
  83. {
  84. text-decoration:underline;
  85. }
  86.  
  87. #box-main
  88. {
  89. left:0px;
  90. top:0px;
  91. bottom:0px;
  92. overflow:hidden;
  93. width:60%;
  94. position:absolute;
  95. }
  96. #box-res
  97. {
  98. width:100%;
  99. border:1px solid rgba(0,0,0,0.9);
  100. top:0%;
  101. height:10%;
  102. min-height:32px;
  103. overflow-x:hidden;
  104. overflow-y:scroll;
  105. z-index:100;
  106. position:absolute;
  107. background:linear-gradient(to right,rgba(0,0,0,0.15) 0%,rgba(0,0,0,0.6) 50%,rgba(0,0,0,0.15) 100%);
  108. }
  109. #box-buttons
  110. {
  111. top:58px;
  112. right:0px;
  113. bottom:0px;
  114. left:0px;
  115. position:absolute;
  116. }
  117. #box-BUTTONS
  118. {
  119. top:40px;
  120. right:0px;
  121. bottom:200px;
  122. left:0px;
  123. position:absolute;
  124. }
  125. #box-BUTTONS
  126. {left:30%;}
  127.  
  128. #bulkDisplay
  129. {
  130. margin:-20px 24px 6px 24px;
  131. border:none;
  132. background:transparent;
  133. }
  134.  
  135.  
  136. .thing
  137. {
  138. display:inline-block;
  139. padding:0px;
  140. cursor:pointer;
  141. }
  142. .thing:active
  143. {
  144. opacity:0.5;
  145. }
  146. .upgrade.owned,.achiev.owned
  147. {
  148. box-shadow:0px 0px 0px 2px rgba(0,0,0,0.5) inset;
  149. }
  150. .thing.cantAfford
  151. {
  152. opacity:0.65;
  153. }
  154. .upgrade.cantAfford
  155. {
  156. border:none;
  157. }
  158.  
  159. .thing-costs{font-weight:bold;text-shadow:1px 1px 0px rgba(0,0,0,0.5);}
  160. .cost.hasEnough{color:#0f0;}
  161. .cost.notEnough{color:#f00;}
  162.  
  163.  
  164. .button>.thing-text
  165. {
  166. text-decoration:underline;
  167. }
  168.  
  169. .building
  170. {
  171. display:block;
  172. margin-right:0px;
  173. font-size:14px;
  174. }
  175.  
  176. .fullWidth
  177. {
  178. display:block;
  179. margin-left:0px;
  180. margin-right:0px;
  181. z-index:10;
  182. }
  183. #game .fullWidth
  184. {
  185. height:auto;
  186. min-height:auto;
  187. }
  188. .fullWidth,.fullWidth:hover
  189. {
  190. background:rgba(0,0,0,0.75);
  191. box-shadow:none;
  192. color:#fff;
  193. }
  194. .fullWidth:before,.fullWidth:after
  195. {
  196. content:'';
  197. height:1px;
  198. background:rgba(255,255,255,0.75);
  199. position:absolute;
  200. left:0px;
  201. right:0px;
  202. z-index:-1;
  203. }
  204. .fullWidth:before{top:-1px;}
  205. .fullWidth:after{bottom:-1px;}
  206.  
  207. .fullWidth .thing-icon
  208. {
  209. margin-top:-10px;
  210. margin-bottom:-10px;
  211. }
  212. .fullWidth .thing-text
  213. {
  214. margin-top:-4px;
  215. margin-bottom:-4px;
  216. }
  217.  
  218. .listing
  219. {
  220. font-weight:normal;
  221. }
  222.  
  223. #game.filtersOn .thing-icon{filter:drop-shadow(3px 3px 1px rgba(0,0,0,0.5));}
  224.  
  225. #box-store
  226. {
  227. right:0px;
  228. top:0px;
  229. bottom:0px;
  230. width:40%;
  231. position:absolute;
  232. background:linear-gradient(to right,rgba(0,0,0,0.15) 0%,rgba(0,0,0,0.6) 50%,rgba(0,0,0,0.15) 100%);
  233. }
  234. #box-shop
  235. {
  236. top:0px;
  237. bottom:0px;
  238. width:100%;
  239. height:15%;
  240. right:0%;
  241. overflow-x:hidden;
  242. overflow-y:scroll;
  243. position:absolute;
  244. background:rgba(0,125,0,0.4);
  245. border:1px solid rgba(0,0,0,0.9);
  246. background:linear-gradient(to right,rgba(0,0,0,0.15) 0%,rgba(0,0,0,0.6) 50%,rgba(0,0,0,0.15) 100%);
  247. }
  248. #box-ownedstuff
  249. {
  250. top:15%;
  251. bottom:0px;
  252. width:100%;
  253. height:90%;
  254. right:0%;
  255. overflow-x:hidden;
  256. overflow-y:scroll;
  257. padding-bottom:48px;
  258. position:absolute;
  259. background:rgba(0,125,0,0.4);
  260. border:1px solid rgba(0,0,0,0.9);
  261. background:linear-gradient(to right,rgba(0,0,0,0.15) 0%,rgba(0,0,0,0.6) 50%,rgba(0,0,0,0.15) 100%);
  262. }
  263.  
  264. #box-shop>.box-header
  265. {
  266. padding-bottom:16px;
  267. }
  268. #box-menu
  269. {
  270. width:80%;
  271. left:20%;
  272. top:70%;
  273. height:50%;
  274. border:2px solid rgba(0,0,0,0.9);
  275. background:linear-gradient(to right,rgba(0,0,0,0.15) 0%,rgba(0,0,0,0.6) 50%,rgba(0,0,0,0.15) 100%);
  276. position:absolute;
  277. }
  278. #box-res.thing-icon
  279. {
  280. width:32px;
  281. height:32px;
  282. }
  283. #box-Commands
  284. {
  285. width:20%;
  286. top:70%;
  287. height:50%;
  288. border:2px solid rgba(0,0,0,0.9);
  289. background:linear-gradient(to right,rgba(0,0,0,0.15) 0%,rgba(0,0,0,0.6) 50%,rgba(0,0,0,0.15) 100%);
  290. position:absolute;
  291. }
  292.  
  293. Resources
  294. //Achievements
  295. *ACHPoints
  296. always hidden
  297. *ACH
  298. text:<b>[ACHPoints]/0 (~[((ACHPoints/0)*100)]%) earned</>
  299. tag:ACHTAG
  300. no tooltip
  301. //Map
  302. *X
  303. can be negative
  304. on earn:
  305. if (X>=1) lose tag:LocationADT
  306. else if (X=0 and y=0) yield tag:LocationADT
  307. end
  308. on lose:
  309. if (X=0 and y=0) yield tag:LocationADT
  310. else if (-1>=X) lose tag:LocationADT
  311. end
  312. *y
  313. can be negative
  314. on earn:if (y>=1) lose tag:LocationADT
  315. on earn:if (y=0 and X=0) yield tag:LocationADT
  316. on lose:if (y=0 and X=0) yield tag:LocationADT
  317. on lose:if (-1>=y) lose tag:LocationADT
  318. *AreaID
  319. //Tick
  320. *Tick
  321. on tick:yield 1 Tick
  322. *Scene
  323. on earn:lose (Tick) Tick
  324. on tick:if (Tick=0 and Scene=0) show tag:Prompts
  325. on tick:if (Tick=0 and Scene=0) show tag:LocateArea
  326. on tick:if (Tick=3 and Scene=0) lose 1 Tick
  327. *GameLoadTick
  328. on tick:if (0>=GameLoadTick) yield 1 GameLoadTick
  329. on load:lose 1 GameLoadTick
  330. on tick:if (GameLoadTick=0) log Game has been loaded.
  331. Buildings
  332. Upgrades
  333. //Control
  334. *Coordinates
  335. text:[X],[y]
  336. tag:Control
  337. no tooltip
  338. //Layout
  339. *TEMPLATE
  340. tag:LayoutThings
  341. no buy
  342. no tooltip
  343. on click:hide tag:ACHTAG
  344. on click:hide tag:Locations
  345. on click:hide tag:Shop
  346. on click:hide tag:Debug
  347. on click:hide tag:achieves
  348. *ShopL
  349. name:Shop
  350. on click:show tag:Shop
  351. *LocationsL
  352. name:Navigation
  353. on click:show tag:Locations
  354. *AchL
  355. name:Achievements
  356. on click:show tag:ACHTAG
  357. on click:show tag:achieves
  358. *DebugL
  359. name:Settings
  360. on click:show tag:Debug
  361. //e
  362. //refresh
  363. *TEMPLATE
  364. *Refresh
  365. name:Inspect
  366. desc:Click to inspect your surroundings.
  367. on click:if (X=0 and y=0) yield 1 ADTyh
  368. tag:refresh
  369. //Battle
  370. //Outside
  371. //ADT
  372. *TEMPLATE
  373. tag:LocationADT
  374. no buy
  375. hidden when 0
  376. start with
  377. *ADTyh
  378. name:Your House
  379. desc:Nice Cozy Place
  380. on click:yield 1 AreaID
  381. on click:lose tag:LocationADT
  382. on click:yield tag:LocationADTyh
  383. *TEMPLATE
  384. tag:LocationADTyh
  385. hidden when 0
  386. no buy
  387. *yHadt
  388. name:Leave
  389. desc:Leave Your House to go outside
  390. on click:lose 1 AreaID
  391. on click:lose tag:LocationADTyh
  392. on click:yield tag:LocationADT
  393. //Navigation
  394. //Menu
  395. *TEMPLATE
  396. tag:Prompts
  397. no tooltip
  398. no buy
  399. start with
  400. hidden
  401. *North
  402. name:--North--
  403. on click:if (AreaID=0) yield 1 y
  404. *West
  405. name:--West--
  406. on click:if (AreaID=0) lose 1 X
  407. *East
  408. name:--East--
  409. on click:if (AreaID=0) yield 1 X
  410. *South
  411. name:--South--
  412. on click:if (AreaID=0) lose 1 y
  413. //Location Marker
  414. *TEMPLATE
  415. hidden
  416. tag:Locations
  417. *LocatedAt
  418. text:<b>Currently At</b>:[?X=0 and y=0 and AreaID=1|Your House|][?AreaID=0|Outside|]</><b>In</b>:[?X=0 and y=0|Town|Null]
  419. name:Current Location
  420. tag:Locations
  421. desc:[?X=0 and y=0 and AreaID=0|A nice little town in the middle of nowhere.|Null]
Advertisement
Add Comment
Please, Sign In to add comment