yes, that's what i needed. thank you, Tom!AF wrote:springai::Unit* unit = springai::WrappUnit::GetInstance(skirmishAIId, evt->unitId);
Search found 16 matches
- 29 Jan 2014, 08:55
- Forum: AI
- Topic: [solved] i don't know my enemy
- Replies: 4
- Views: 1362
Re: i don't know my enemy
- 23 Jan 2014, 04:16
- Forum: AI
- Topic: [solved] i don't know my enemy
- Replies: 4
- Views: 1362
Re: i don't know my enemy
i'm sorry, i can't understand what you wrote. does that mean i can't get what i want in C++?PicassoCT wrote:if you had acess to the synced lua, i would say to try to get this as a enemyid via a pushed lua_call down into the engine identified..
- 22 Jan 2014, 11:08
- Forum: AI
- Topic: path cost is always zero
- Replies: 8
- Views: 2237
Re: path cost is always zero
looks like the returned zero is a path ID, which i'm supposed to pass to
but that function always returns an invalid AIFloat3. so i'm still stuck.
Code: Select all
springai::AIFloat3 GetNextWaypoint(int pathId)
- 22 Jan 2014, 10:59
- Forum: AI
- Topic: [solved] i don't know my enemy
- Replies: 4
- Views: 1362
[solved] i don't know my enemy
Code: Select all
struct SEnemyEnterLOSEvent {int enemy;};
- 16 Jan 2014, 11:09
- Forum: AI
- Topic: what is spot average income?
- Replies: 1
- Views: 937
what is spot average income?
trying to get it with
but it returns me 0.65 for the Delta Siege Dry map, whereas a metal extractor produces 2.04 actually.
what's the trick?
Code: Select all
callback->GetMap()->GetResourceMapSpotsAverageIncome(callback->GetResourceByName("Metal"))
what's the trick?
- 13 Jan 2014, 09:12
- Forum: AI
- Topic: path cost is always zero
- Replies: 8
- Views: 2237
- 12 Jan 2014, 16:06
- Forum: AI
- Topic: path cost is always zero
- Replies: 8
- Views: 2237
Re: path cost is always zero
shall i report the bug? can you inform those who need to know about it?
- 12 Jan 2014, 07:18
- Forum: AI
- Topic: path cost is always zero
- Replies: 8
- Views: 2237
path cost is always zero
the following code ... for(std::vector<springai::AIFloat3>::iterator i = metalSpots.begin(); i != metalSpots.end(); ++i) { ... int length = callback->GetPathing()->GetApproximateLength(commanderUnit->GetPos(), *i, 0, 8.0f); ...} ... always returns zero path cost: armcom position: (2565.161133, 120.8...
- 10 Jan 2014, 16:09
- Forum: AI
- Topic: [solved] first steps in developing a C++ AI
- Replies: 10
- Views: 4706
Re: first steps in developing a C++ AI
all right, that's how: ... springai::Unit* commanderUnit = callback->GetTeamUnits().front(); ... commanderUnit->Build(callback->GetUnitDefByName("armsolar"), commanderUnit->GetPos(), UNIT_COMMAND_BUILD_NO_FACING); ... thank you guys for your help. now i can proceed to the most exciting part.
- 09 Jan 2014, 16:14
- Forum: AI
- Topic: [solved] first steps in developing a C++ AI
- Replies: 10
- Views: 4706
Re: first steps in developing a C++ AI
i'm sorry, but since i don't have enough of "common sense and basic deducation combined with basic C++ knowledge", would you please explain to me how to get UnitDef for a solar collector from the C++ AI Interface Wrapper? it would be so tolerant of you.AF wrote:springai::UnitDef* ud = ....
- 08 Jan 2014, 18:49
- Forum: AI
- Topic: [solved] first steps in developing a C++ AI
- Replies: 10
- Views: 4706
Re: first steps in developing a C++ AI
okay, let's say i want the commander to build a solar collector at the commander's current position. there's a build member function for a unit: Build(UnitDef* toBuildUnitDef, const springai::AIFloat3& buildPos, int facing, short options = 0, int timeOut = INT_MAX) correct me if i'm wrong, in my...
- 08 Jan 2014, 17:52
- Forum: AI
- Topic: [solved] first steps in developing a C++ AI
- Replies: 10
- Views: 4706
Re: first steps in developing a C++ AI
http://springrts.com/wiki/AI:Development http://springrts.com/wiki/AIWrapper:Cpp minimalistic example ai: http://springrts.com/wiki/AI:CppTestAI source code: https://github.com/spring/spring/blob/develop/AI/Skirmish/CppTestAI/src/CppTestAI.cpp full-featured ai: https://github.com/Tarendai/Shard yes...
- 08 Jan 2014, 15:43
- Forum: AI
- Topic: [solved] first steps in developing a C++ AI
- Replies: 10
- Views: 4706
[solved] first steps in developing a C++ AI
hello,
i'm stuck in the very beginning. how can i give orders?
i'm stuck in the very beginning. how can i give orders?
- 07 Jan 2014, 14:53
- Forum: AI
- Topic: [solved] how to build a C++ AI?
- Replies: 7
- Views: 1740
Re: how to build a C++ AI?
oh, that's really neat!make AAI Shard Kaik

- 07 Jan 2014, 13:56
- Forum: AI
- Topic: [solved] how to build a C++ AI?
- Replies: 7
- Views: 1740
Re: how to build a C++ AI?
yes, compiling inside spring is recommended as some ai interface / header files are automaticly generated. (afaik) you can extract all dependencies but imo its not worth the trouble/time. if you are using linux then compiling should be quiet easy ... yes, i'm on Kubuntu. i noticed the new release o...
- 04 Jan 2014, 12:12
- Forum: AI
- Topic: [solved] how to build a C++ AI?
- Replies: 7
- Views: 1740
[solved] how to build a C++ AI?
hello and happy New Year!
do i have to incorporate the AI sources into the Spring sources and then build and install Spring from the sources? is there another way without building Spring?
do i have to incorporate the AI sources into the Spring sources and then build and install Spring from the sources? is there another way without building Spring?