on first exec
on first exec
Im Menu kann man einstellen dass der Score nur einmal gegeben wird (give score on first execution). Wie kann man das im Script einstellen?
-
- Süßwasserpirat
- Beiträge: 258
- Registriert: 22.09.2002, 21:28
- Kontaktdaten:
Re:on first exec
Im Script musst du selbst irgendwie prüfen, ob dies die erstmalige Ausführung oder eine wiederholte ist. Du kannst dies bspw. über normale Variablen oder GlobalInts verwalten.
Beispiel:
in global script - game_start:
SetGlobalInt (5, 1);
im interaction script:
if (GetGlobalInt (5) > 0)
{
GiveScore (10);
SetGlobalInt (5, 0);
}
Beispiel:
in global script - game_start:
SetGlobalInt (5, 1);
im interaction script:
if (GetGlobalInt (5) > 0)
{
GiveScore (10);
SetGlobalInt (5, 0);
}