关于 instance creation code
gamemaker吧
全部回复
仅看楼主
level 1
shen92889 楼主
我在Room ---------- instance creation code里写的如下代码怎么无效啊,instance(人物)不动啊
event_perform(ev_step,ev_step_normal)
{
if keyboard_check(ord("A"))
{
x = x - 4;
}
if keyboard_check(ord("D"))
{
x = x + 4;
}
if keyboard_check(ord("W"))
{
y = y - 4;
}
if keyboard_check(ord("S"))
{
y = y + 4;
}
在Object--------Add Event -------Step里写的代码却有效。
什么原因?什么原因?什么原因?
2018年05月27日 16点05分 1
level 9
创建代码只在创建的时候执行啊,怎么能动
2018年05月28日 21点05分 2
event_perform(ev_step,ev_step_normal这句我要调用step事件不行吗?那么instance creation code功能只是初始化instance变量咯?
2018年05月29日 02点05分
@shen92889 1.是调用了,但只调用了一次;2.初始化变量应放在Create事件,Creation Code在Create事件之后执行
2018年05月29日 02点05分
多谢以上解答
2018年06月03日 01点06分
多谢以上解答
2018年06月03日 01点06分
1