Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
LilDrippyMyFnf
GitHub Repository: LilDrippyMyFnf/FNF-BitEnigne
Path: blob/master/Source/ChartEvents/bouncyarrows.lua
2151 views
1
--Created by RamenDominoes
2
--Credit is appreciated, but not necessary <3
3
4
5
function onCreatePost()
6
7
--NO TOUCHY THESE!!!
8
------------------------------------------------------------------
9
BFLeft = getPropertyFromGroup('playerStrums', '0', 'x')
10
BFDown = getPropertyFromGroup('playerStrums', '1', 'y')
11
BFUp = getPropertyFromGroup('playerStrums', '2', 'y')
12
BFRight = getPropertyFromGroup('playerStrums', '3', 'x')
13
14
OPLeft = getPropertyFromGroup('opponentStrums', '0', 'x')
15
OPDown = getPropertyFromGroup('opponentStrums', '1', 'y')
16
OPUp = getPropertyFromGroup('opponentStrums', '2', 'y')
17
OPRight = getPropertyFromGroup('opponentStrums', '3', 'x')
18
------------------------------------------------------------------
19
20
--touchy this hehe
21
Movement = 20 --Wouldn't recommend going above 40(even that's a lot), but it would be kinda funny
22
23
------------------------------------------------------------------
24
25
end
26
27
28
function goodNoteHit(id, direction, noteType, isSustainNote)
29
30
if direction == 0 then
31
noteTweenX('leftBF', 4, BFLeft - Movement, 0.2, 'ElasticOut')
32
33
elseif direction == 1 then
34
noteTweenY('downBF', 5, BFDown + Movement, 0.2, 'ElasticOut')
35
36
elseif direction == 2 then
37
noteTweenY('upBF', 6, BFUp - Movement, 0.2, 'ElasticOut')
38
39
elseif direction == 3 then
40
noteTweenX('rightBF', 7, BFRight + Movement, 0.2, 'ElasticOut')
41
42
43
end
44
45
runTimer('ReturnBF', 0.08, 1)
46
47
end
48
49
function opponentNoteHit(id, direction, noteType, isSustainNote)
50
51
if direction == 0 then
52
noteTweenX('leftOP', 0, OPLeft - Movement, 0.2, 'ElasticOut')
53
54
elseif direction == 1 then
55
noteTweenY('downOP', 1, OPDown + Movement, 0.2, 'ElasticOut')
56
57
elseif direction == 2 then
58
noteTweenY('upOP', 2, OPUp - Movement, 0.2, 'ElasticOut')
59
60
elseif direction == 3 then
61
noteTweenX('rightOP', 3, OPRight + Movement, 0.2, 'ElasticOut')
62
63
64
end
65
66
runTimer('ReturnOp', 0.08, 1)
67
68
end
69
70
function onTimerCompleted(tag, loops, loopsLeft)
71
72
if tag == 'ReturnBF' then
73
74
noteTweenX('leftBF', 4, BFLeft, 0.05, 'linear')
75
noteTweenY('downBF', 5, BFDown, 0.05, 'linear')
76
noteTweenY('upBF', 6, BFUp, 0.05, 'linear')
77
noteTweenX('rightBF', 7, BFRight, 0.05, 'linear')
78
end
79
80
if tag == 'ReturnOp' then
81
82
noteTweenX('leftOP', 0, OPLeft, 0.05, 'linear')
83
noteTweenY('downOP', 1, OPDown, 0.05, 'linear')
84
noteTweenY('upOP', 2, OPUp, 0.05, 'linear')
85
noteTweenX('rightOP', 3, OPRight, 0.05, 'linear')
86
end
87
end
88
89
-- all from https://gamebanana.com/tools/10237
90
91