Garry 的 mod 表达式 2 for 循环
Garry's mod Expression 2 for loop
在一款名为 Garry's mod 的游戏中,有一个名为 wiremod 的插件。在 wiremod 内部有表达式 2,它是基于命令行的编码,所以执行命令。我遇到问题的 For 循环命令是因为我不能在变量内执行变量。在 CMD 中,我可以设置本地 EnableLocalExtension 并执行 !Var%Var%!
更简单的代码是:(cap sensitive)
@inputs [GoCard1,GoCart2,GoCart3,GoCart4]:entity
X = 64
Y = 24
-N is the variable
-10 is max number
-1 is how much it increments by
for(N,10,1)
{
Menu:egpText(1,toString(GoCart1),vec2(X,Y)
Y+=24 -increase by 24
I++ -increase by 1
}
我的问题是我无法将 GoCart1 更改为 GoCart2、GoCart3...等等
尝试了 GoCartN 但给我一个错误 GoCartN 不存在
有人有什么想法吗?
简答我要分开代码
@inputs [GoCard1,GoCart2,GoCart3,GoCart4]:entity
X = 64
Y = 24
T = table(GoCart1,GoCart2,GoCart3,GoCart4)
for(N,10,1)
{
Menu:egpText(1,"1. "+toString(T[N,entity]),vec2(X,Y)
Y+=24 -increase by 24
I++ -increase by 1
}
如果有人知道如何将 GoCart 放入循环中,请告诉我
在一款名为 Garry's mod 的游戏中,有一个名为 wiremod 的插件。在 wiremod 内部有表达式 2,它是基于命令行的编码,所以执行命令。我遇到问题的 For 循环命令是因为我不能在变量内执行变量。在 CMD 中,我可以设置本地 EnableLocalExtension 并执行 !Var%Var%! 更简单的代码是:(cap sensitive)
@inputs [GoCard1,GoCart2,GoCart3,GoCart4]:entity
X = 64
Y = 24
-N is the variable
-10 is max number
-1 is how much it increments by
for(N,10,1)
{
Menu:egpText(1,toString(GoCart1),vec2(X,Y)
Y+=24 -increase by 24
I++ -increase by 1
}
我的问题是我无法将 GoCart1 更改为 GoCart2、GoCart3...等等 尝试了 GoCartN 但给我一个错误 GoCartN 不存在 有人有什么想法吗?
简答我要分开代码
@inputs [GoCard1,GoCart2,GoCart3,GoCart4]:entity
X = 64
Y = 24
T = table(GoCart1,GoCart2,GoCart3,GoCart4)
for(N,10,1)
{
Menu:egpText(1,"1. "+toString(T[N,entity]),vec2(X,Y)
Y+=24 -increase by 24
I++ -increase by 1
}
如果有人知道如何将 GoCart 放入循环中,请告诉我