How do I check if an id of an instance of an object is two pixels below charcter in Fuze?
-
GML stands for Game Maker Language
Here is a GML example
[code]
if (place_meeting(x,y+2,Carla)) //checks if a Carla is two pixels below
{
i = instance_place(x,y+2,Carla); //i is equal to a specific Carla that is two pixels below
var_hp = 12; //variable var_hp = 12;
}
}
[/code]
^ how do I change up above code to work in Fuze please? Thank you so very extremely super much in advance. -
I don't know GML, but you can use three `-symbols before and after your code to display it as code, to keep formatting. Like so:
if place_meeting(x, y+2, Carla) then i = instance_place(x, y+2, Carla) hp = 12 endif
Fuze doesn't have any
Carla
, but you can create your own data structures and functions:carlas = [ [.x = 1, .y = 2, .name = "Carla Senior", .description = "Doesn't get the credit she deserves"], [.x = 7, .y = 10, .name = "Carla Junior", .description = "She has a crush on you"], [.x = 7, .y = 5, .name = "Clara 5", .description = "What's this cow doing here? She's not a carla!"] ] function place_meeting(x, y, carla) var found = carla.x == x and carla.y == y return found // tries to find a clara at the provided location, if not found, return Clara 5 in stead. function instance_place(x, y) var found var i for i = 0 to len(carlas) loop found = carlas[i] if place_meeting(x, y, found) then break endif repeat return found
Like I said, I don't know GML so this example code might not do what you tried to do. But it can give an impression about how Fuze works for you.
-
Thank you
(note from Kat- posts must contain at least 12 characters)