Skip to content

Commit

Permalink
Merge pull request #27 from Flubberschnub/verticalmotion
Browse files Browse the repository at this point in the history
some internal counters
  • Loading branch information
Flubberschnub authored Nov 25, 2020
2 parents 43729e9 + 3b42d2e commit 04fbedf
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions data/lc/functions/derez/forcederez.mcfunction
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
##forcederez (run as cyclestand within matchedid)
scoreboard players set @s[tag=!derezzing] rezanimate 16
scoreboard players add @a[tag=matchedid] exploded 1
execute at @s[tag=!derezzing] run playsound lightcycle.derez master @a[distance=..30] ~ ~ ~ 1 1
kill @e[tag=matchedid,tag=cyclecart]
tag @s add derezzing
2 changes: 1 addition & 1 deletion data/lc/functions/load.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ scoreboard players set 50 Constant 50
scoreboard players set 100 Constant 100

##message
tellraw @a ["",{"text":"Reloaded!","underlined":true,"color":"green"},{"text":" TRON Vehicles v1.2.6","bold":true,"italic":true,"color":"white"},{"text":" "},{"text":"by","color":"yellow"},{"text":" "},{"text":"F","color":"dark_aqua"},{"text":"lubberschnub","color":"dark_gray"}]
tellraw @a ["",{"text":"Reloaded!","underlined":true,"color":"green"},{"text":" TRON Vehicles v1.2.7","bold":true,"italic":true,"color":"white"},{"text":" "},{"text":"by","color":"yellow"},{"text":" "},{"text":"F","color":"dark_aqua"},{"text":"lubberschnub","color":"dark_gray"}]
1 change: 1 addition & 0 deletions data/lc/functions/match/cyclestand/derez.mcfunction
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
scoreboard players operation IDMatcher CycleID = @s CycleID
execute as @e if score @s CycleID = IDMatcher CycleID run tag @s add matchedid
scoreboard players add @a[tag=matchedid] derezzed 1
execute as @e[tag=cyclecollider,tag=matchedid] run function lc:derez/self
tag @e[tag=matchedid] remove matchedid
1 change: 1 addition & 0 deletions data/lc/functions/motion/collision/movingderez.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ scoreboard players set @s[tag=!derezzing] rezanimate 16
execute at @s[tag=!derezzing] run playsound lightcycle.crash master @a[distance=..100] ~ ~ ~ 3 1 0.1
data merge entity @s[tag=!derezzing] {Motion:[0.0,0.0,0.0]}
tag @s[scores={speed=1980..}] add exploded
scoreboard players add @a[tag=matchedid] exploded 1
scoreboard players set @s speed 0
execute at @s rotated ~90 ~ run particle flash ^ ^ ^2 0 0 0 0 1 force
execute at @s rotated ~90 ~ run particle smoke ^ ^1 ^2 0 0 0 0.1 100 force
Expand Down
6 changes: 4 additions & 2 deletions data/lj/functions/guns/hitshot.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ scoreboard players add @e[distance=..5,tag=lightribbon] ribbontimer 10
execute unless block ~ ~ ~ #lj:passthrough run playsound lightjet.guns.hit master @a[distance=..10] ~ ~ ~

##kill counter
execute as @a[tag=jetcollider,tag=!matchedid,distance=..5] run scoreboard players add @a[tag=matchedid] derezzes 1
execute as @a[tag=cyclecollider,tag=!matchedid,distance=..5] run scoreboard players add @a[tag=matchedid] derezzes 1
execute as @e[tag=jetcollider,tag=!matchedid,tag=!counted,distance=..5] run scoreboard players add @a[tag=matchedid] derezzes 1
execute as @e[tag=cyclecollider,tag=!matchedid,tag=!counted,distance=..5] run scoreboard players add @a[tag=matchedid] derezzes 1
tag @e[tag=jetcollider,tag=!matchedid,distance=..5] add counted
tag @e[tag=cyclecollider,tag=!matchedid,distance=..5] add counted

##block hit particle
execute if block ~ ~ ~ grass_block run particle minecraft:block grass_block ^ ^ ^-0.5 0.1 0.1 0.1 0.1 10
Expand Down
1 change: 1 addition & 0 deletions data/lj/functions/match/jetstand/derez.mcfunction
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
scoreboard players operation IDMatcher JetID = @s JetID
execute as @e if score @s JetID = IDMatcher JetID run tag @s add matchedid
scoreboard players add @a[tag=matchedid] derezzed 1
execute as @e[tag=jetcollider,tag=matchedid] run function lj:derez/self
tag @e[tag=matchedid] remove matchedid
1 change: 1 addition & 0 deletions data/lj/functions/motion/collision/movingderez.mcfunction
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
##movingderez
scoreboard players set @s[tag=!derezzing] rezanimate 16
execute at @s[tag=!derezzing] run playsound lightcycle.crash master @a[distance=..100] ~ ~ ~ 3 1 0.1
scoreboard players add @a[tag=matchedid] exploded 1
data merge entity @s[tag=!derezzing] {Motion:[0.0,0.0,0.0]}
scoreboard players set @s speed 0
execute at @s rotated ~90 ~ run particle flash ^ ^ ^2 0 0 0 0 1 force
Expand Down
2 changes: 1 addition & 1 deletion data/lj/functions/move.mcfunction
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
##move (run as cyclestand)


data remove entity @s Motion.[1]
function aestd1:entity/set_motion_from_rotation2d
scoreboard players operation @s aestd.math.in = @s speed
function aestd1:entity/set_motion_magnitude
Expand Down
2 changes: 2 additions & 0 deletions data/lv/functions/load.mcfunction
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
##scoreboards
scoreboard objectives add derezzes dummy
scoreboard objectives add derezzed dummy
scoreboard objectives add exploded dummy
scoreboard objectives add value dummy

scoreboard players set MILLION Constant 1000000
Expand Down

0 comments on commit 04fbedf

Please sign in to comment.