安装 Steam
登录
|
语言
繁體中文(繁体中文)
日本語(日语)
한국어(韩语)
ไทย(泰语)
български(保加利亚语)
Čeština(捷克语)
Dansk(丹麦语)
Deutsch(德语)
English(英语)
Español-España(西班牙语 - 西班牙)
Español - Latinoamérica(西班牙语 - 拉丁美洲)
Ελληνικά(希腊语)
Français(法语)
Italiano(意大利语)
Bahasa Indonesia(印度尼西亚语)
Magyar(匈牙利语)
Nederlands(荷兰语)
Norsk(挪威语)
Polski(波兰语)
Português(葡萄牙语 - 葡萄牙)
Português-Brasil(葡萄牙语 - 巴西)
Română(罗马尼亚语)
Русский(俄语)
Suomi(芬兰语)
Svenska(瑞典语)
Türkçe(土耳其语)
Tiếng Việt(越南语)
Українська(乌克兰语)
报告翻译问题
First thing you should be aware of is that instance_place() is a special collision test. It checks for a collision between the calling objects collision mask and the specified objects collision mask if the calling object were at a speicifc location. Therefore both objects require a collision mask and to exist in the first place. If you're already aware of this and it's still not working I'll be happy to upload the code in the demo I made to test it.
It seems quite clear that I am using the function incorrectly as I am not entirely sure what you mean by special collision test. Do I have to enable collision check in order for the function to work properly? Since my code is fairly simple, I will simply write the entire code here.
Currently I have 2 'Obj_ele's in an empty room.
My code locaded in step event in Obj_ele is as follows :
if mouse_button_check(mb_left)
{
if abs(x-mouse_x)<=32 && abs(y-mouse_y)<=32
{
if select = 0 && global.selection = 0
{
global.first = instance_place(x,y,Obj_ele);
select = 1;
global.selection = 1;
}
if select = 0 && global.selection = 1
{
global.second = instance_place(x,y,Obj_ele);
select = 1;
global.selection = 2;
}
}
}
if first != 0
{
instance_create(first.x, first.y, Obj_test);
}
if second != 0
{
instance_create(second.x, second.y, Obj_test);
}
I used this to test instance_place function. Whenever I click on the Obj_ele, Obj_test does appear in the screen, but on (0,0) location rather than the appropriate location.
I am sorry, I didn't literally copy paste the codes. I declared first and second global variables through globalvar first; and globalvar second;
Would it be possible to upload the code? I have tried everything and it simply isn't working. I don't understand the problem at this point.
Thank you so much for helping me.