Thanks for the response. A few passages earlier, I use these (in separate passages) to set up most of the relevant objects. I am attempting to reate an RPG-like combat system.
<<set $calcdmg to 0>>
<<set $enemy1 ={
name: "none",
level: 1,
maxHP: 0,
hp: $maxHP,
attack: 0,
critrate: 0,
critbonus: 0,
defense: 0,
speed: 0,
magic: 0,
evadechance: 0,
}>>
<<set $enemy2 ={
name: "none",
level: 1,
maxHP: 0,
hp: $maxHP,
attack: 0,
critrate: 0,
critbonus: 0,
defense: 0,
speed: 0,
magic: 0,
evadechance: 0,
}>>
<<set $enemy3 ={
name: "none",
level: 1,
maxHP: 0,
hp: $maxHP,
attack: 0,
critrate: 0,
critbonus: 0,
defense: 0,
speed: 0,
magic: 0,
evadechance: 0,
}>>
<<set $target ={
name: "none",
level: 1,
maxHP: 0,
hp: $maxHP,
attack: 0,
critrate: 0,
critbonus: 0,
defense: 0,
speed: 0,
magic: 0,
evadechance: 0,
}>>
<<set $bat = {
name: "bat",
maxHP: 3,
hp: $maxHP,
attack: 1,
critrate: 1,
critbonus: 1,
defense: 1,
speed: 1,
magic: 1,
evadechance: 2,
}>>
target is made to equal enemy1 in a setter link, which has previously been made to equal bat:
<<link '$enemy1.name' "Attack2.2">><<set $target = $enemy1>><</link>><br>
<<set $enemynumber = 2>>
<<set $enemy1 = $bat>>
<<set $enemy1.level = 1>>
<<set $enemy2 = $bat>>
<<set $enemy2.level = 1>>
What do you think could be wrong with it?