P
ProductivInc
Guest
I made a script: when I click at the selected object it replaces it with another object. However, It doesnt work and I am a complete beginner at GML. Can you please explain what I'm doing wrong and show me exactly?
Script:
if mouse_check_button(mb_left)
{
if position_meeting(mouse_x, mouse_y, oTower1) instance_create_depth(mouse_x,mouse_y,-1,oTowerUPGRADE);
}
OTower1 is the object I want to click at so it can replace it with OTowerUpgrade.
This is a tower defense game where I'm trying to make a simple upgrade system...
Script:
if mouse_check_button(mb_left)
{
if position_meeting(mouse_x, mouse_y, oTower1) instance_create_depth(mouse_x,mouse_y,-1,oTowerUPGRADE);
}
OTower1 is the object I want to click at so it can replace it with OTowerUpgrade.
This is a tower defense game where I'm trying to make a simple upgrade system...