- Joined
- Aug 7, 2013
- Messages
- 1,338
Hi,
So is there any function in Lua object generation that will delete a custom made object by its rawcode?
e.g.
This is the problem, however
So I've made some object whose rawcode is "id" (whatever that is). Now later on I decide I don't want to change the tint of this object. So I recompile the function as
But, unexpectedly, instead of deleting the previous object with rawcode "id." it simply finds the entry, and changes its fields.
This means, the tint changes still exist, even though the original baseId object had normal tint.
The two solutions I've known are just to manually delete the object in the object editor, or manually make the changes, e.g.
Both are these bulky and impossible to automate.
So instead, it would be easier if there was a delete object function. It would be like this
Now the new object won't have the tint changes of the previous one.
So does this function exist? Or any way to do it?
So is there any function in Lua object generation that will delete a custom made object by its rawcode?
e.g.
JASS:
// i delete('H000')
This is the problem, however
JASS:
//! i setobjecttype("units")
//! i createobject(baseId, id)
//! i makechange(current, "uclr", red)
//! i makechange(current, "uclg", green)
//! i makechange(current, "uclb", blue)
So I've made some object whose rawcode is "id" (whatever that is). Now later on I decide I don't want to change the tint of this object. So I recompile the function as
JASS:
//! i setobjecttype("units")
//! i createobject(baseId, id)
But, unexpectedly, instead of deleting the previous object with rawcode "id." it simply finds the entry, and changes its fields.
This means, the tint changes still exist, even though the original baseId object had normal tint.
The two solutions I've known are just to manually delete the object in the object editor, or manually make the changes, e.g.
JASS:
//! i setobjecttype("units")
//! i createobject(baseId, id)
//! i makechange(current, "uclr", "255")
//! i makechange(current, "uclg", "255")
//! i makechange(current, "uclb", "255")
Both are these bulky and impossible to automate.
So instead, it would be easier if there was a delete object function. It would be like this
JASS:
//! i deleteobject(id)
//! i setobjecttype("units")
//! i createobject(baseId, id)
Now the new object won't have the tint changes of the previous one.
So does this function exist? Or any way to do it?