本帖最后由 沙皇蘑菇 于 2019-8-2 22:50 编辑
$gameActors.actor ( 1000 ) ._equips = $gameActors.actor ( actorpool[ this ._actorIndex] ) ._equips;
$gameActors.actor ( 1000 ) .mhp = $gameActors.actor ( actorpool[ this ._actorIndex] ) .mhp ;
$gameActors.actor ( 1000 ) .mmp = $gameActors.actor ( actorpool[ this ._actorIndex] ) .mmp ;
$gameActors.actor ( 1000 ) .atk = $gameActors.actor ( actorpool[ this ._actorIndex] ) .atk ;
$gameActors.actor ( 1000 ) .def = $gameActors.actor ( actorpool[ this ._actorIndex] ) .def ;
$gameActors.actor ( 1000 ) .mat = $gameActors.actor ( actorpool[ this ._actorIndex] ) .mat ;
$gameActors.actor ( 1000 ) .mdf = $gameActors.actor ( actorpool[ this ._actorIndex] ) .mdf ;
$gameActors.actor ( 1000 ) .agi = $gameActors.actor ( actorpool[ this ._actorIndex] ) .agi ;
$gameActors.actor ( 1000 ) .luk = $gameActors.actor ( actorpool[ this ._actorIndex] ) .luk ;
$gameActors.actor ( 1000 ) .changeEquip ( 1 , 5 ) ;
var actorstatus = new Array( 8 ) ;
actorstatus[ 0 ] = $gameActors.actor ( 1000 ) .mhp ;
actorstatus[ 1 ] = $gameActors.actor ( 1000 ) .mmp ;
actorstatus[ 2 ] = $gameActors.actor ( 1000 ) .atk ;
actorstatus[ 3 ] = $gameActors.actor ( 1000 ) .def ;
actorstatus[ 4 ] = $gameActors.actor ( 1000 ) .mat ;
actorstatus[ 5 ] = $gameActors.actor ( 1000 ) .mdf ;
actorstatus[ 6 ] = $gameActors.actor ( 1000 ) .agi ;
actorstatus[ 7 ] = $gameActors.actor ( 1000 ) .luk ;
console.log ( $gameActors.actor ( 1000 ) .atk ) ;
console.log ( $gameActors.actor ( 1000 ) ._equips) ;
$gameActors.actor ( 1000 ) ._equips = $gameActors.actor ( actorpool[ this ._actorIndex] ) ._equips;
$gameActors.actor ( 1000 ) .mhp = $gameActors.actor ( actorpool[ this ._actorIndex] ) .mhp ;
$gameActors.actor ( 1000 ) .mmp = $gameActors.actor ( actorpool[ this ._actorIndex] ) .mmp ;
$gameActors.actor ( 1000 ) .atk = $gameActors.actor ( actorpool[ this ._actorIndex] ) .atk ;
$gameActors.actor ( 1000 ) .def = $gameActors.actor ( actorpool[ this ._actorIndex] ) .def ;
$gameActors.actor ( 1000 ) .mat = $gameActors.actor ( actorpool[ this ._actorIndex] ) .mat ;
$gameActors.actor ( 1000 ) .mdf = $gameActors.actor ( actorpool[ this ._actorIndex] ) .mdf ;
$gameActors.actor ( 1000 ) .agi = $gameActors.actor ( actorpool[ this ._actorIndex] ) .agi ;
$gameActors.actor ( 1000 ) .luk = $gameActors.actor ( actorpool[ this ._actorIndex] ) .luk ;
$gameActors.actor ( 1000 ) .changeEquip ( 1 , 5 ) ;
var actorstatus = new Array( 8 ) ;
actorstatus[ 0 ] = $gameActors.actor ( 1000 ) .mhp ;
actorstatus[ 1 ] = $gameActors.actor ( 1000 ) .mmp ;
actorstatus[ 2 ] = $gameActors.actor ( 1000 ) .atk ;
actorstatus[ 3 ] = $gameActors.actor ( 1000 ) .def ;
actorstatus[ 4 ] = $gameActors.actor ( 1000 ) .mat ;
actorstatus[ 5 ] = $gameActors.actor ( 1000 ) .mdf ;
actorstatus[ 6 ] = $gameActors.actor ( 1000 ) .agi ;
actorstatus[ 7 ] = $gameActors.actor ( 1000 ) .luk ;
console.log ( $gameActors.actor ( 1000 ) .atk ) ;
console.log ( $gameActors.actor ( 1000 ) ._equips) ;
这一段代码应该换掉第1000号角色的装备,但是却没有,为什么?
$gameActors.actor(1000)._equips = $gameActors.actor(actorpool[this._actorIndex])._equips;
测试出来是这一行出了问题,现在问题变成了怎么样才能让两个角色的装备相同。
希望各位大佬能帮我解答。
代码是不完整的,但是里面所有的变量都定义过,所以不是这方面的问题