![](https://attach.openclonk.org/avatars/333-37704.png)
Gibts in der Form nicht mehr, in einigen Szenarien wird das mit einem globalen Effekt geregelt, also in diesem Schema:
AddEffect("IntIrgendeinName", nil, 1, 2, nil, nil);
global func FxIntIrgendeinNameTimer(object target, proplist effect, int time)
{
if(effect.Time == 20)
{
DoSomething();
}
if(effect.Time == 50)
{
SomethingElse();
}
usw. etc. pp...
}
![](https://attach.openclonk.org/avatars/65-0196.png)
PS: Wenn du nur erstmal einen Ersatz fuer die Szenarientimer suchst, dann kannst du sowas nehmen:
func FxScenarioTimerTimer(target, effect, time)
{
if(effect.stopped) return 1;
effect.counter += 1;
Scenario->Call(Format("Script%d", effect.counter));
return 1;
}
func ScriptGo(bool go)
{
var e = GetEffect("ScenarioTimer");
if (!e && !go) return 1;
if (!go)
{
e.stopped = true;
}
else
{
if (!e)
e = AddEffect("ScenarioTimer", nil, 10, 1);
e.stopped = false;
}
return 1;
}
func goto(int x)
{
var e = GetEffect("ScenarioTimer");
if (!e)
e = AddEffect("ScenarioTimer", nil, 10, 1);
e.counter = x - 1;
}
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill