×

Langue

Fermer
Atelier 801
  • Forums
  • Dev Tracker
  • Connexion
    • English Français
      Português do Brasil Español
      Türkçe Polski
      Magyar Română
      العربية Skandinavisk
      Nederlands Deutsch
      Bahasa Indonesia Русский
      中文 Filipino
      Lietuvių kalba 日本語
      Suomi עברית
      Italiano Česky
      Hrvatski Slovensky
      Български Latviešu
      Estonian
  • Langue
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • [Module] Puissance 4 !
[Module] Puissance 4 !
Athesdrake
« Citoyen »
1545604740000
    • Athesdrake#0000
    • Profil
    • Derniers messages
    • Tribu
#1
  7
  • Présentation
  • Code

Puissance 4



Vous aimez jouer au Puissance 4 ? Ce module est fait pour vous !
Défiez vos amis et montrez leur que vous êtes le plus fort !

N'hésitez pas à donner votre avis sur le module !


Règles du jeu

Les règles du jeu sont tout à fait classiques: chacun à son tour, vous placez un pion dans la grille. Vous devez aligner horizontalement, verticalement ou diagonalement 4 pions de votre couleur pour gagner.

Attention ! Un compte à rebours est affiché au-dessus de la grille, jouez avant qu'il n'arrive à zéro !


Comment jouer ?

Copiez le code dans la fenêtre Lua dans la maison de tribu (/lua). Ensuite, utilisez la commande !join pour jouer.

Vous pouvez également utiliser la commande suivie du pseudo d'une personne en particulier si vous souhaitez jouer contre cette personne. Cette personne recevra un popup et devra répondre par "Oui" si celle-ci veut jouer contre vous.


Screenshots

https://i.imgur.com/84vwzfU.png


https://i.imgur.com/ActGjvm.png


https://i.imgur.com/V0aBElF.png


https://i.imgur.com/uv2zuy5.png


https://i.imgur.com/drqLbSr.png
Je suis trop fort pour lui e.e



Idées à rajouter:
  • 2 vs 2 et 1 vs tous.
  • Fixer des bugs.
  • Faire une belle map.
  • Enlever d'autres bugs, soyons prudent.
  • Ajouter plus de traductions (pourquoi pas ?).
  • Ajouter une IA (bof).
  • Vous avez une idée à me proposer ? Dites-le moi !


Bugs connus
  • Des fois, la ligne n'est pas correctement alignée avec les 4 pions gagnants.

Voici le code. Vous pouvez également retrouver le script sur mon Github.
Le code sur Github est plus récemment mis à jour (donc plus buggué) et le code ci-dessus est moins souvent mis à jour (donc plus stable).

Code
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
-- Classes
-- Grid
Grid = {}
Grid.__index = Grid

function Grid.new(width, height)
if (not width) or (not height) then
return setmetatable({
{0,0,0,0,0,0,0},
{0,0,0,0,0,0,0},
{0,0,0,0,0,0,0},
{0,0,0,0,0,0,0},
{0,0,0,0,0,0,0},
{0,0,0,0,0,0,0},
}, Grid)
end

local tbl = {}
for i=1, height do
tbl[i] = {}
for j=1, width do
tbl[i][j] = 0
end
end

return setmetatable(tbl, Grid)
end

function Grid.__call(self)
-- if (not self.coro) or coroutine.status(self.coro)=='dead'then
-- self.coro = coroutine.create(function()
-- for i=1, #self do
-- coroutine.yield(i, self[i])
-- end
-- end)
-- end
-- return table.unpack({coroutine.resume(self.coro)}, 2)
local tbl = {}
for i=1, #self do
tbl[#tbl+1] = self[i]
end
return next, tbl
end

function Grid:cols()
local grid = Grid(6, 7)
grid.rotated = true

for i, line in self() do
for j, value in next, line do
grid[j][i] = value
end
end

return grid
end

function Grid:diagonals(reverse)
local diags = {}

for i, line in self() do
for j, value in next, line do
local index = reverse and j-i+6 or i+j-1
-- print(index)
local tbl = diags[index]

if not tbl then
diags[index] = {}
tbl = diags[index]
end

tbl[#tbl+1] = value
end
end

setmetatable(diags, Grid).reverse = reverse
return diags
end

function Grid:checkWin(check)
local calcPoint = function(x, y)
if check then
if self.rotated then
return {y,x}
else
local i = y+(x-x%8)/8
local j = x-i+1
if self.reverse then
-- i = 8-i
j = x+i-6
end
return {i,j}
end
else
return {x,y}
end
end

for i, line in self() do
local score, p1, last = 0, {0,0}, 0
for j, v in next, line do
if last~=v or v==0 then
score, last, p1 = 1, v, {i,j}
else
score = score +1
if score==4 then
return true, calcPoint(table.unpack(p1)), calcPoint(i,j)
end
end
end
end

if not check then
local cols = {self:cols():checkWin(true)}
if cols[1] then
return table.unpack(cols)
end

local diags = {self:diagonals():checkWin(true)}
if diags[1] then
return table.unpack(diags)
end
return self:diagonals(true):checkWin(true)
end
return false
end

function Grid:drop(j)
local index = nil
for i, line in self() do
if line[j]==0 then
index = i
else
break
end
end

return index
end
setmetatable(Grid, {__call=function(_,...) return Grid.new(...) end})

-- Translation
T = {
en = {
join = 'Type !join to play to connect4',
turn = "<%s>%s<n>'s turn",
queue = 'Queue',
win = {
timer = '<v>%s</v> won, <v>%s</v> took too much time !',
draw = "Nobody won, it\'s a draw !",
left = '<v>%s</v> won, <v>%<v> has left !',
won = '<v>%s</v> won !'
},
askJoin = '%s want to play with you.\nDo you accept ?',
yes = 'Yes',
no = 'No'
},
fr = {
join = 'Utilise la commande !join pour jouer à puissance 4',
turn = "Au tour de <%s>%s<n>",
queue = "File d'attente",
win = {
timer = '<v>%s</v> a gagné, <v>%s</v> à pris trop de temps !',
draw = "Égalité, personne n'a gagné !",
left = '<v>%s</v> a gagné, <v>%s</v> est partit !',
won = '<v>%s</v> a gagné !'
},
askJoin = '%s veut jouer avec toi.\nAccepter ?',
yes = 'Oui',
no = 'Non'
}
}
do
for l,tbl in next, T do
if l~='en' then
T[l] = setmetatable(tbl, {
__index = function(self, key)
if not T.en[key] then
error(("<r>The key '%s' does not exists</r>"):format(key))
else
print(("<r>The key '%s' is missing in the locale '%s'</r>"):format(key, l), 2)
return T.en[key]
end
end
})
end
end
setmetatable(T, {
__index = function(self, key)
print(key)
if rawget(self, key) then
return rawget(self, key)
end
return self.en
end
})
end

-- Main
function main()
-- const
TIME_PER_TURN = 20

--ids
ids = setmetatable({__id=0}, {
__index = function(self, key)
if rawget(self, key) then -- If the key already exists
return rawget(self, key) -- Then return it
end

self.__id = self.__id +1 -- Otherwise increment the counter
return rawset(self, key, self.__id)[key] -- Set the new id to the key and return the value
end,
__newindex = function() end
})

mfid = -1
turn = 0

--tables
locale = {}
players = {nbr=0}
timer = {active=false, time=0}
grid = Grid()
queue = {}

-- system
for k,v in next, {'AutoShaman', 'AutoNewGame', 'AfkDeath', 'PhysicalConsumables'} do
tfm.exec['disable'..v](true)
end
system.disableChatCommandDisplay('join', true)
system.disableChatCommandDisplay('call', true)
table.foreach(tfm.get.room.playerList, eventNewPlayer)
new_game(true)
end

-- Events
eventPlayerDied = tfm.exec.respawnPlayer

function eventNewPlayer(name)
need_reload = true
if players.nbr<2 then
eventNewGame()
end
if players.nbr>=1 then
showVersus()
end
locale[name] = T[tfm.get.room.playerList[name].community]
print(tfm.get.room.playerList[name].community)
ui.addTextArea(ids.join, '<p align="center"><font size="30">'..locale[name].join, name, 0, 20, 800, nil, 0x0, 0x0, 0, true)
tfm.exec.respawnPlayer(name)
end

function eventPlayerLeft(name)
for k,v in next, queue do
if v[1]==name then
if v[2] then
queue[k] = {v[2]}
else
for i=k,#queue do
queue[i] = queue[i+1]
end
end
break
elseif v[2]==name then
v[2] = nil
break
end
end
update_queue()
if players[name] then
ui.displayWin('left', displayName(players[name].opponent), displayName(name))
eventWin(players[name].opponent)
end
end

function eventChatCommand(name, cmd)
if not name then return end -- prevent nil name from new_game

local args = {}
for a in cmd:gmatch('%S+') do
args[#args+1] = a
end

if args[1]=='join' then
local p2 = nil
if args[2] then
p2 = args[2]:match('#%d+$') and args[2] or args[2]..'#0000'
end

if players[name] then return end
if p2 then
if players[p2] or not tfm.get.room.playerList[p2] then return end -- TODO: add an error message

for k,v in next, queue do if v[1]==name or v[2]==name or v[1]==p2 or v[2]==p2 then return end end
ui.addPopupArea(ids.askJoin, locale[p2].askJoin:format(displayName(name)), p2, 'join$'..name, 300, 100, 200, 100)
elseif players.nbr==2 then
for k,v in next, queue do if v[1]==name or v[2]==name then return end end

for k,tbl in next, queue do
if not tbl[2] then
tbl[2] = name
return update_queue()
end
end
queue[#queue+1] = {name}
update_queue()
else
local opponent = 0
if players.nbr==1 then
turn = 2
for n in next, tfm.get.room.playerList do
local txt = "<b><font size='16'>"..locale[n].turn:format('j', displayName(name))
ui.addTextArea(ids.turn, txt, n, 580, 360, 225, nil, 0x0, 0x0, 0, true)
end
for n, pl in next, players do
if n~='nbr' then
pl.opponent = name
opponent = n
break -- it should be only one player but whatever it's better to be sure.
end
end
system.bindMouse(name, true)
system.bindMouse(opponent, true)
timer.active = true
timer.time = TIME_PER_TURN
end
local color = players.nbr==1 and 0xffff00 or 0xff0000
players.nbr = players.nbr +1
players[name] = {id=players.nbr, color=color, opponent=opponent}

showVersus()
end
elseif cmd:match('^call') and name=='Athesdrake#0000' then
local path, args = nil, {}
local tbl = {
n = tonumber,
s = tostring,
_ = function(s)
local tbl = _G
for p in s:gmatch('[^%.]+') do
if tbl[p] then
tbl = tbl[p]
else
return print('do not exists:', p)
end
end
return tbl
end
}
for m in cmd:gmatch('%S+') do
if not path or path=='call' then
path = m
end
local arg = {m:match('^%$([^$]+)%$([^$]+)$')}
if arg[1] and tbl[arg[1]] then
args[#args+1] = tbl[arg[1]](arg[2])
end
end
local func = tbl._(path)
print(func, table.unpack(args))
if func then
func(table.unpack(args))
end
end
end

function eventTextAreaCallback(id, name, callback)
local args = {}
for a in callback:gmatch('[^$]+') do
args[#args+1] = a
end

if args[1]=='join' then
ui.removePopupArea(ids.askJoin, name)
if args[3]=='yes' then
local p1, p2 = args[2], name
-- TODO: add error message
if players[p1] or players[p2] then return end
for k,v in next, queue do if v[1]==p1 or v[2]==p1 or v[1]==p2 or v[2]==p2 then return end end

if players.nbr==0 then
eventChatCommand(p1, 'join')
eventChatCommand(p2, 'join')
else
queue[#queue+1] = {p1,p2}
update_queue()
end
end
end
end

function eventLoop()
for k, tbl in next, _timeout do
if os.time()>=tbl.t then
tbl.f(table.unpack(tbl.args))
table.remove(_timeout, k)
break
end
end
if timer.active then
timer.time = timer.time - 0.5
if timer.time<=0 then
ui.removeTextArea(ids.timer)
timer.active = false

local player
for k,v in next, players do if k~='nbr' and v.id==turn then player=v;break end end
local p1, p2 = players[player.opponent].opponent, player.opponent
if turn==players[p1].id then
p1, p2 = p2, p1
end

ui.displayWin('timer', displayName(p1), displayName(p2))
eventWin(p1)
turn = 0
return
end
ui.addTextArea(ids.timer, ('<b><p align="center"><font size="20">%d'):format(math.floor(timer.time)), nil, 0, 90, 800, nil, 0x0, 0x0, 0, true)
end
end

function eventNewGame()
need_reload = false

local id = 1000
local idpp = function() id = id +1; return id end

tfm.exec.addPhysicObject(idpp(), 400, 255, {type=12, width=350, height=270, color=0xff, miceCollision=false, groundCollision=false})
for x=280, 520, 40 do
for y=155, 355, 40 do
tfm.exec.addPhysicObject(idpp(), x, y, {type=13, width=15, miceCollision=false, groundCollision=false, color=0x6A7495})
end
tfm.exec.addPhysicObject(idpp(), x-20, 200, {type=14, height=400, miceCollision=false})
end
tfm.exec.addPhysicObject(idpp(), 540, 200, {type=14, height=400, miceCollision=false})
tfm.exec.addPhysicObject(idpp(), 400, 375, {type=14, width=270, miceCollision=false})
end

function eventMouse(name, x, y)
x = x-(x+20)%40+20
if x<280 or x>520 then return end

local player = players[name]
if not player then
system.bindMouse(name, false)
return
end
if player.id~=turn then return end
turn = 0

local j = (x-280)/40+1
local i = grid:drop(j)
if not i then
turn = player.id
return
end
grid[i][j] = player.id

tfm.exec.addPhysicObject(mfid, x, 80, {type=13, width=15, miceCollision=false, color=player.color, dynamic=true, fixedRotation=true})
tfm.exec.addPhysicObject(mfid-1, x, 60, {type=14, width=15, miceCollision=false, dynamic=true, fixedRotation=true})
mfid = mfid -2

local win = {grid:checkWin()}
if win[1] then
ui.removeTextArea(ids.turn)
ui.removeTextArea(ids.timer)
timer.active = false
setTimeout(ui.displayWin, 1, 'won', displayName(name))
eventWin(name, win)
return
end

local color = player.id==1 and 'j' or 'r'
for n in next, tfm.get.room.playerList do
local txt = "<b><font size='16'>"..locale[n].turn:format(color, displayName(player.opponent))
ui.addTextArea(ids.turn, txt, n, 580, 360, 225, nil, 0x0, 0x0, 0, true)
end

setTimeout(function(p) turn = players[p].id end, 0.5, player.opponent, true)
timer.time = TIME_PER_TURN
timer.active = true

for n in next, grid[1] do
if n~=0 then
return
end
end

ui.displayWin('draw')
eventWin(nil)
end

function eventWin(name, win)
players = {nbr=0}
timer.active = false

local scale = function(p)
return {
240+p[2]*40,
115+p[1]*40
}
end

if win then
draw(1, scale(win[2]), scale(win[3]), 0xffffff, 5)
end
setTimeout(new_game, 5)
end

-- Ui
ui.displayWin = function(type, ...)
print(type)
for n in next, tfm.get.room.playerList do
local txt = locale[n].win[type]:format(...)
ui.addTextArea(ids.won, '<p align="center"><font size="25">'..txt, n, 0, 50, 800, nil, 0x0, 0x0, 0, true)
end
end
ui.addPopupArea = function(id, txt, name, callback, x, y, width, height)
width = width or 200
height = height or 100

function addPopup(id, txt, x, y, w, h)
ui.addTextArea(id+0, ' ', name, x-1, y-1, w, h, 0x5D7D90, 0x5D7D90, 1, true)
ui.addTextArea(id+1, ' ', name, x+1, y+1, w, h, 0x000001, 0x000001, 1, true)
ui.addTextArea(id+2, txt, name, x , y , w, h, 0x3C5064, 0x3C5064, 1, true)
end
addPopup(id*1000, txt, x, y, width, height) -- main body

local h = 20
local y, w = y+height-3*h/2, 3*width/10
local txt = '<p align="center"><a href="event:%s%s">%s'
addPopup(id*1000+3, txt:format(callback, '$yes', locale[name].yes), x+width/10, y, w, h) -- button 'yes'
addPopup(id*1000+6, txt:format(callback, '$no', locale[name].no), x+3*width/5, y, w, h) -- button 'no'
end
ui.removePopupArea = function(id, name)
for i=id*1000, id*1000+9 do
ui.removeTextArea(i, name)
end
end

-- Debug
_print = print
function print(...)
local tmp, lasti = {}, 0
for i, v in next, {...} do
lasti = lasti+1
if lasti~=i then
for j=1, i-lasti do
tmp[#tmp+1] = 'nil'
end
lasti = i
end
tmp[#tmp+1] = tostring(v)
end

_print(table.concat(tmp, ' '))
end

-- Game
function new_game(map)
grid = Grid()
players = {nbr=0}

if map or need_reload then
tfm.exec.newGame('<C><P /><Z><S><S L="800" o="324650" H="10" X="400" Y="394" T="12" P="0,0,0.3,0.2,0,0,0,0" /></S><D /><O /></Z></C>')
end
if not map then
ui.removeTextArea(ids.won)
draw(1, {10,0}, {11,0}, 0xffffff, 1) -- tfm.exec.removeJoint is not working >:(

for i=-1, mfid, -1 do
tfm.exec.removePhysicObject(i)
end
mfid = -1

local p1, p2 = table.unpack(queue[1] or {})
eventChatCommand(p1, 'join')
eventChatCommand(p2, 'join')

for i=1,#queue do
queue[i] = queue[i+1]
end
update_queue()

ui.removeTextArea(ids.versus)
end
end

function update_queue()
local txt = {'<font size="14"><b>%s:</b>'}

for k, tbl in next, queue do
txt[#txt+1] = ('<r>%s <g>vs <j>%s'):format(displayName(tbl[1]), tbl[2] and displayName(tbl[2]) or '?')
end

if #txt>1 then
txt = table.concat(txt, '\n\t')
for n in next, tfm.get.room.playerList do
ui.addTextArea(ids.queue, txt:format(locale[n].queue), n, 0, 50, nil, nil, 0x0, 0x0, 0, true)
end
else
ui.removeTextArea(ids.queue)
end
end

-- Draw
function draw(id, pos1, pos2, color, line)
local def = {type=0, point1=table.concat(pos1, ","), point2=table.concat(pos2, ","), line=line or 3, color=color, alpha=1, foreground=true}
tfm.exec.addJoint(id, 1001, 1002, def)
end

-- DisplayName
function displayName(playerName)
if type(playerName)~='string' then
print(('<R>displayName expected a string as argument, got "%s"</R>'):format(tostring(playerName)))
return tostring(playerName)
end

local name = playerName:match('^([^#]+)')
for pl in next, tfm.get.room.playerList do
if pl~=playerName then
local n = pl:match('^([^#]+)')
if name==n then
return playerName
end
end
end
return name
end

-- ShowVersus
function showVersus()
local txt = '<p align="center"><font size="20"><b><r>%s \n<v>vs\n <j>%s'
local pl = {}
for n in next, players do
if n~='nbr' then
pl[#pl+1] = n
end
end
if #pl==0 then
return
elseif #pl==1 then
pl[2] = 0
end

local p1, p2 = table.unpack(pl)
if players[p1].id==2 then
p1, p2 = p2, p1
end
ui.addTextArea(ids.versus, txt:format(displayName(p1), p2==0 and '?' or displayName(p2)), nil, 575, 120, 225, nil, 0x0, 0x0, 0, true)
end

-- SetTimeout
_timeout = {}
function setTimeout(f, seconds, ...)
_timeout[#_timeout+1] = {t=os.time()+seconds*1000, f=f, args={...}}
end

main()


Dernière modification le 1545605100000
Sebafrancuz
« Consul »
1545651780000
    • Sebafrancuz#0000
    • Profil
    • Derniers messages
    • Tribu
#2
  0
Great job!
Sydilenie
« Citoyen »
1546517400000
    • Sydilenie#0000
    • Profil
    • Derniers messages
    • Tribu
#3
  0
comment faite vous des images dans des modules ?
Nkrym
« Censeur »
1546545780000
    • Nkrym#6378
    • Profil
    • Derniers messages
#4
  0
Excellent travail !
Athesdrake
« Citoyen »
1546638420000
    • Athesdrake#0000
    • Profil
    • Derniers messages
    • Tribu
#5
  0
Sebafrancuz a dit :
Great job!

Thanks o/

Sydilenie a dit :
comment faite vous des images dans des modules ?

Il n'y a aucune image dans le module. Seuls les membres de la Module Team peuvent mettre des images.
Il est également possible de mettre des images dans la map depuis la dernière mise à jour LUA.
Je t'invite d'aller visiter ce topic ;-)

Tartor a dit :
Excellent travail !

Merci ^^
Bobolemouton
« Censeur »
1546828800000
    • Bobolemouton#9848
    • Profil
    • Derniers messages
    • Tribu
#6
  0
Je l'ai testé, c'est super !
Mais je rajoute juste que parfois lorsque l'on empile plusieurs jetons ils commencent à trembler, c'est pas embêtant mais je report quand même au cas où
Athesdrake
« Citoyen »
1546880400000
    • Athesdrake#0000
    • Profil
    • Derniers messages
    • Tribu
#7
  0
Bobolemouton a dit :
Je l'ai testé, c'est super !
Mais je rajoute juste que parfois lorsque l'on empile plusieurs jetons ils commencent à trembler, c'est pas embêtant mais je report quand même au cas où

Merci ^^
J'ai déjà pu remarquer cet étrange comportement, mais je ne pense pas pouvoir faire quelque chose, vu que ça vient des sols.
Peut-être que ça tremblera moins avec de la friction.
J'ai également pu remarquer que ça tremble selon le synchronisateur. Si ça vient de là, je ne sais malheureusement rien faire :/
Nathaan
« Citoyen »
1546884600000
    • Nathaan#0000
    • Profil
    • Derniers messages
    • Tribu
#8
  0
Athesdrake a dit :
Bobolemouton a dit :
Je l'ai testé, c'est super !
Mais je rajoute juste que parfois lorsque l'on empile plusieurs jetons ils commencent à trembler, c'est pas embêtant mais je report quand même au cas où

Merci ^^
J'ai déjà pu remarquer cet étrange comportement, mais je ne pense pas pouvoir faire quelque chose, vu que ça vient des sols.
Peut-être que ça tremblera moins avec de la friction.
J'ai également pu remarquer que ça tremble selon le synchronisateur. Si ça vient de là, je ne sais malheureusement rien faire :/

Tu peux remplacer le jeton par un objet non dynamique après plusieurs secondes ?
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • [Module] Puissance 4 !
© Atelier801 2018

Equipe Conditions Générales d'Utilisation Politique de Confidentialité Contact

Version 1.27