13.11.2018, 08:51
Quote:
Apart from an Item name ("Gate1" in your example) could there be custom properties for Items?
So that I could for example add a "Health" attribute to any Item and access that value from the script? That would allow for completely setting up gamemodes/maps in the Editor. That's what I do with my Editor and it's damn useful! |
pawn Code:
CMD:something(playerid, params[])
{
Scene.SetProperty(scene, objGate1, "Health", 50);
new health = Scene.GetProperty(scene, objGate1, "Health");
return 1;
}
The same thing however can be done without the need of properties:
pawn Code:
new objHealths[MAX_DYNAMIC_OBJECTS];
CMD:something(playerid, params[])
{
objHealths[objGate1] = 50;
new health = objHealths[objGate1];
return 1;
}