I’m creating a module and I want, when the player destroys a tree, for a campfire that the player can interact with via conversation to spawn in the same spot, I am awful at scripting and the internet doesn’t seem to have anything on this subject, if anyone could help, that would be fantastic
EDIT: This is as far as I’ve managed to get using what I could find on the internet
void main()
{
location spawn1 = GetLocation (GetWaypointByTag ("campfirewaypoint"));
CreateObject (OBJECT_TYPE_PLACEABLE, "Campfirethatcooksfish", spawn1);
}
This is on the tree’s death script slot, the waypoint is placed a stone’s throw from it and the campfirethatcooksfish template is in the custom palette, still no results, what am I doing wrong?
EDIT EDIT: Also, I have double and triple checked all the tags are identical to what they’re supposed to be linking to