Not logged inOpenClonk Forum
Up Topic Goal can it work?

This board is threaded (i.e. has a tree structure). Please use the Reply button of the specific post you are referring to, not just any random button. If you want to reply to the topic in general, use the Post button near the top and bottom of the page.

Post Reply
In Response to Kandif
I tried long time ago to do my test goal:

#include Library_Goal

local orangepoints;
local whitepoints;

protected func Initialize()
{
  orangepoints = 0;
  whitepoints = 0;
}

public func IsFulfilled(int player)
{
  if(GetPlayerTeam(player)==1)&&(orangepoints>12))
  return true;
  if(GetPlayerTeam(player)==2)&&(whitepoints>12))
  return true;

  return false;
}

public func addorn()
{
  orangepoints+=1;
}

public func addwhi()
{
  whitepoints+=1;
}

and in one of object have this:

    FindObject(Find_ID(Goal_WinTM))->addorn();

But it doesn't work. Why? And how to fix it ?
I add this goal by:
CreateObject(Goal_WinTM, 0, 0, NO_OWNER);

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill