Arrow shooting example |
![]() ![]() « Citoyen » 1383052380000
| 1 | ||
An example which uses mouse clicks, objects, physics, timing, text areas and a queue. I added some comments where needed. Feel free to comment and ask questions. Code Lua 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 local settings = { Dernière modification le 1481368320000 |
![]() ![]() « Citoyen » 1383052500000
| 0 | ||
[•] Init Error : [string "transformice.lua"]:37: 'then' expected if player and player.ammo > 0 then broken because edit :) |
0 | ||
dat maths |
![]() ![]() « Citoyen » 1383065160000
| 0 | ||
Cool i LIKE This |
![]() ![]() « Citoyen » 1383087960000
| 0 | ||
so... how do you change what you shoot? |
![]() ![]() « Citoyen » 1383093600000
| 0 | ||
The maths hurt my brain! Im getting some random [•] Argument error. also. |
![]() ![]() « Citoyen » 1383126240000
| 0 | ||
Xanmeow a dit : Change the object type in tfm.exec.addShamanObject. Jaackster a dit : That happens when both speed arguments in tfm.exec.movePlayer are between -1 and 1, it's a bug in the API. |
![]() ![]() « Citoyen » 1383178320000
| 0 | ||
I found out how to break it by changing a number in it from nil to 10 [•] Runtime Error : transformice.lua:115: index expected, got number |
![]() ![]() « Citoyen » 1383215460000
| 0 | ||
Xanmeow a dit : That's because you set an internal queue element to a number while they are supposed to be either a table or nil. |
![]() ![]() « Citoyen » 1383220680000
| 0 | ||
Makinit a dit : Neat way to make a counter for eventLoop 0: That queue object is so useful, from what I've seen tables tend to be too slow when trying to store objects and remove then quickly, many of my experiments wouldn't be possible without custom data structures like this queue of yours. Thanks for sharing :) |
![]() ![]() « Citoyen » 1383231960000
| 0 | ||
Kugineko a dit : You're welcome. Makinit a dit : Updated the script to avoid this bug: a dit : |
![]() ![]() « Citoyen » 1383237480000
| 0 | ||
I wonder if I can make ammos reload faster? :D |
![]() ![]() « Citoyen » 1383239160000
| 0 | ||
Noobzaii a dit : You could change ammoTicks in settings to 1, which is the lowest possible value and will cause reloading to take half a second. You could also call ammo() in eventLoop more than once or remove ammo limitation altogether. |
0 | ||
I have created script like this , equal functions codes etc my script dont remove arrows look Code a dit : |
0 | ||
Makinit a dit : Pastebein pls '-' |
![]() ![]() « Censeur » 1383476940000
| 0 | ||
Chadgraygui a dit : Weird how it looks just like Mak's script with some change of variable names. Walidpokemon a dit : http://pastebin.com/GupGVyHg |
0 | ||
Yeah scripts do not change much code Makinit give-me your permission for you queue remove? Y have catch the part of infinite time this Code i catch a dit : |
![]() ![]() « Citoyen » 1383484500000
| 0 | ||
wow.. I like this a lot, good job! Chadgraygui a dit : It’s exactly the same script.. |
0 | ||
I catch some parts i solicited permission queue my is a simple create arrows and not remove Iinsert credits fluffy |
![]() ![]() « Citoyen » 1383485520000
| 0 | ||
Chadgraygui a dit : It’s the same script. As Safwan said, you only edited some variables. |