I want to create new goal, but i can't find any help in Documentation.
So i ask you.
How to make new goal ?
So i ask you.
How to make new goal ?
You just have to create a new object that inherits from the goal-library by using the line
And then your goal has to implement the callback
Example goal that is won when the first player has more than 100 gold:
You can, for example, just copy the "ScriptGoal.ocd" into your folder, rename it and adjust the script and description
#include Library_Goal
And then your goal has to implement the callback
func IsFulfilled()
and return true
if the goal is already fulfilled or false
otherwise.Example goal that is won when the first player has more than 100 gold:
#include Library_Goal
func IsFulfilled()
{
if(GetWealth(0) > 100) return true;
else return false;
}
You can, for example, just copy the "ScriptGoal.ocd" into your folder, rename it and adjust the script and description
Whats the problem? You can view an simple standard goal and adapt it.
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill