#.
1 messages · Page 1 of 1 (latest)
So
I dont understand how {Arena::%arg-1%,%player%::*} works in some places, but not the on death: thing.
Why doesnt it work there?
arg-1 refers to the arguments given to a command. In a death event, there are no command arguments
command /duel [<player>] [<text>]:
^arg-1^ ^arg-2^```
%victim's uuid% %attacker's uuid%
alright
thanks
let me try it out rq
uh
on death:
if {Duel::*} contains player:
clear {Arena::%victim%,%attacker%::*}'s inventory
spawn(victim)
wait 2 seconds
spawn(attacker)
wait 1 seconds
set blocks in radius 70 of location(200,0,{Arena::%victim%,%attacker%::*},"duels") where [input is not air] to air
You'd probably have to loop all where input isn't air and then set it to air
loop x:
set loop-value to air
but it works...
what are you setting those blocks to? you seem to be missing a "to dirt" or something
wdym all blocks?
all blocks in radius ...
ah
Am i blind, or am I not seeing the "to air" line wrapping, nvm
that didnt work either..
same error
on death:
if {Duel::*} contains player:
clear {Arena::%victim%,%attacker%::*}'s inventory
spawn(victim)
wait 2 seconds
spawn(attacker)
wait 1 seconds
loop all blocks in radius 70 of location(200,0,{Arena::%victim%,%attacker%::*},"duels"):
set loop-value to air
set a local var to the location
then loop all blocks in radius 70 around {_var} where []
on death:
if {Duel::*} contains player:
clear {Arena::%victim%,%attacker%::*}'s inventory
spawn(victim)
wait 2 seconds
spawn(attacker)
wait 1 seconds
set {_arena} to location(200,0,{Arena::%victim%,%attacker%::*},"duels")
loop all blocks in radius 70 around {_arena}:
set loop-value to air
Uhm
{Arena::%victim%,%attacker%::*} is currently set to 200.
::* means the entire list
jesus christ i am so dumb
lmao
on death:
if {Duel::*} contains player:
clear {Arena::%victim%,%attacker%}'s inventory
spawn(victim)
wait 2 seconds
spawn(attacker)
wait 1 seconds
set {_arena} to location(200,0,{Arena::%victim%,%attacker%},"duels")
loop all blocks in radius 70 around {_arena}:
set loop-value to air
So removing the ::* fixed the errors.
Let me test it our real quick.
So.
No need to ping
command /duelaccept [<player>]:
trigger:
if arg-1 is not set:
play sound "block.note_block.bass" at volume 0.75 and pitch 0.75 to player
send "&7Please specify a player who has sent you a duel request." to player
else:
if {Request.%arg-1%.%player%} is set:
broadcast "&c%player%"
broadcast "&c%arg-1%"
delete {Request.%arg-1%.%player%}
add arg-1 to {Duel::%arg-1%,%player%::*}
add player to {Duel::%arg-1%,%player%::*}
paste schematic "plugins/FastAsyncWorldEdit/schematics/arena_japan.schem" at location(200,0,{testarena-z} + 200,"duels")
add 200 to {testarena-z}
delete {Arena::%arg-1%,%player%}
set {testarena-z} to {Arena::%arg-1%,%player%}
broadcast "&8%{Arena::%arg-1%,%player%}%"
broadcast "&6%{Duel::%arg-1%,%player%::*}%"
teleport {Duel::%arg-1%,%player%::*} to location(200,0,{Arena::%arg-1%,%player%},"duels")
send "&7You accepted &b%arg-1%&7's duel request!%nl%Generating an arena for you." to player
send "&b%player% &7accepted your duel request!%nl%Generating an arena for you." to arg-1
broadcast "&a&l%{Duel::%arg-1%,%player%::*}%"
When I broadcast {Arena::%arg-1%,%player%} it just returns <none>...
wait.
If you're referring to a certain index, it's ::index
(replace index with whatever)
its cause i set {testarena-z} to {Arena::%arg-1%,%player%}
my bad :|
Ok?