Not logged inOpenClonk Forum
Up Topic General / Help and Questions / How to make my goal.
- - By Kandif [pl] Date 2012-12-10 14:40
I want to create new goal, but i can't find any help in Documentation.
So i ask you.

How to make new goal ?
Parent - By Zapper [de] Date 2012-12-10 15:13
You just have to create a new object that inherits from the goal-library by using the line
#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
Parent - By Dragonclonk [de] Date 2012-12-10 15:14
Whats the problem? You can view an simple standard goal and adapt it.
Reply
Up Topic General / Help and Questions / How to make my goal.

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill