Page 1 of 1

Switching one object to another

PostPosted: Tue Sep 12, 2017 10:57 pm
by Reckoner
Is it possible to script an object to switch from one ID to another? What about switching its image ID? I'm looking to add the ability to chop down trees in my expansion, and would like to be able to transform a tree to a stump.

Thanks.

Re: Switching one object to another

PostPosted: Wed Sep 13, 2017 9:02 am
by Elendil / Redshift
That's not possible, sorry. You can script a tree to disappear when you chop it down, but you cannot put a tree stump in it's place.

You can only do limited things to map objects, most importantly you cannot create/delete them and you cannot put two of them on the block in the editor (to show one and hide the other).

The only way I can imagine doing something like what you want at the moment is to create a map with a forest and one with cut down trees and move/teleport the player instantaneously when he chops them down. And keep everything else looking the same on the maps, including other items/monsters (hard/basically there can be no monsters which move/can be killed because the differences couldn't be kept in check) and all exits/entrances to the map (most likely can only be kept the same with underground maps). So basically no real way, sorry.

Re: Switching one object to another

PostPosted: Wed Sep 13, 2017 9:54 pm
by Reckoner
Elendil / Redshift wrote:The only way I can imagine doing something like what you want at the moment is to create a map with a forest and one with cut down trees and move/teleport the player instantaneously when he chops them down. And keep everything else looking the same on the maps, including other items/monsters (hard/basically there can be no monsters which move/can be killed because the differences couldn't be kept in check) and all exits/entrances to the map (most likely can only be kept the same with underground maps). So basically no real way, sorry.


That's an interesting idea. It wouldn't feasibly work for my expansion's surface maps, but as you said, I could see it having some use in underground maps. I'll just have to make due with switching the visibility of the trees off. Thanks a lot!