B
Bish0p
Guest
I'm using this code :
I want to spawn the Raftex object to the touched instance of water object. i don't know how to spawn it to the instances x and y
For now the spawn is available for only one water instance and it spawns the raft to another instance
GML:
with(obj_water)
{
if(keyboard_check_pressed(vk_space) && place_meeting(obj_player.x,obj_player.y, obj_water))
{
if(instance_exists(obj_raftex))
{
instance_destroy(obj_raftex)
}
else
{
instance_create_layer(obj_water.x, obj_water.y, "Instances", obj_raftex)
}
}
}
For now the spawn is available for only one water instance and it spawns the raft to another instance