[Script] Special Area Minigame |
Itchyboy « Citoyen » 1413253740000
| 0 | ||
So, I got the idea of this short little minigame when I was making a sacrificial table code for my tribe house. This is my first minigame, so it's really bad. I made it in about 30 minutes. I just made a map real quick and then coded it. Green areas have a 50% chance of speeding you up, yellow areas have a 20% chance of giving you cheese, pink areas have a 16.7% chance of letting you win if you have the cheese, and black areas have a 14.3% chance of killing you. Also, if more than half of the players win or die, then a new map will play. I just made one map for it because I was pretty lazy, so if you want to submit some maps or some map XML's (so you don't have to export it) then message me and I'll see if I want to add it or not. If you just want to add it yourself add a comma before the }, and put the XML in with ' in front and back of it. So, to run it in your tribe house just type /lua, then paste this code into it: [url=]http://pastebin.com/W7g8fLaK[/url] . After that, all you have to do is click submit and it'll run. I hope you like it, but you probably won't :P Dernière modification le 1413255060000 |
Ratatoullioe 1413254820000
| | ||
[Modéré par Gavin, raison : Backseat] |
Ratatoullioe 1413254880000
| | ||
[Modéré par Gavin, raison : Accidental] |
Itchyboy « Citoyen » 1413255000000
| 0 | ||
No, this is my minigame... |
0 | ||
The problem with this is that if you change the map it won't work ;; You might want to try Makinit's xml library to check where the grounds are in the XML, it's not that complicated actually. Something like: http://pastebin.com/W6bAkEes As you can see the library does all the hard work for you. In eventNewGame we call the path function to read all the grounds and save their coordinates in a table only if they're rectangle grounds and have no collision with mice or objects (t == "12" and c == "4"). After that you can simply loop through that table to compare the players' coordinates with the four points in each rectangle. And you don't have to put those four points manually in the code, in which case the script won't work with any other map. And you can also have more than one area of each type. I didn't add the randomness or the speed thingy but you can continue from there. I hope you find this useful and you can improve and work some more on this minigame idea. |
Itchyboy « Citoyen » 1413484200000
| 0 | ||
Thanks, I was just going to change the variables and add some new stuff in eventNewGame(). But that's pretty cool. I might add it later because right now I'm feeling pretty lazy :P |
Jaedee « Citoyen » 1413845940000
| 0 | ||
huh, whats the code of the map? |
Itchyboy « Citoyen » 1413850320000
| 0 | ||
The code of the map is an XML because I didn't want to spend cheese on a map I was never going to use again. |