What is 'safeUnitsSpawn'?

Just thought I’d break the ice asking about this one.

So how do we actually use this function that was allegedly added 1-2 years ago? I looked at it thinking, maybe I can have some lulz, and make it spawn units (as apparently aoe3y, was so broken they left that in, players could just spawn monster trucks and cars lol). But now it’s ‘safe’, right, so I am not that caring in asking how it works.

But, alas, even in singleplayer, it seems broken or just completely not usable (without extensive patching). You would think they’d put work into it and then give info how to use it. Or like, put 1 line, say ‘its disabled now’.

I analyzed it a bit and I saw it is looking to see if the spawner unit/building is set able to spawn things. (I guess that’s one way to fix it but yeah)

I spent an hr looking at it (was bored) and I found
unitsSpawn(“ProtoName”,playerID,SpawnUnitID) → safeUnitsSpawn(spawner’s ProtoIndex, creationProtoIndex, amount, playerID, spawner’s unitIndex); but, even then it’s like broken. Even when matches in what it seems to be doing (e.g. Spanish, Town Center, Settler), they match,but still didn’t work.

However I don’t care to waste any more time on something that could just be broken tbh. So, I’d rather ask the devs here.

1 Like

Sounds more like a development thing to me lol.
Besides, I’ve never seen that, can you show me more ?

1 Like