Who is responsible for spawning initial units?
Moderator: Moderators
Who is responsible for spawning initial units?
I faced interesting situation. Spawned commander stuck in a feature and never moved. Is it an engine bug? Or Lua related?
- Attachments
-
- screen024.jpg
- (140.57 KiB) Downloaded 1 time
Last edited by slogic on 30 Jan 2010, 23:03, edited 1 time in total.
Re: Who is responsible for spawning inital units?
Game bug. (Although engine spawns commander atm.)
It's easy for game to include some code to remove features in a small range around start position, or to use AllowStartPosition LuaRules call-in to block positions on top of features... (or AI could be made to reclaim the feature in such case)
It's easy for game to include some code to remove features in a small range around start position, or to use AllowStartPosition LuaRules call-in to block positions on top of features... (or AI could be made to reclaim the feature in such case)
Re: Who is responsible for spawning initial units?
AllowStartPosition is not documented. How do we use it?
Re: Who is responsible for spawning initial units?
old thread is old.
from LuaRules.cpp:
bool CLuaRules::AllowStartPosition(int playerID, const float3& pos)
so its
gadget:AllowStartPosition(playerID, x,y,z)
return true -> player is allowed to place
return false -> denied!
(didnt test, add to wiki if it works)
from LuaRules.cpp:
bool CLuaRules::AllowStartPosition(int playerID, const float3& pos)
so its
gadget:AllowStartPosition(playerID, x,y,z)
return true -> player is allowed to place
return false -> denied!
(didnt test, add to wiki if it works)