Not logged inOpenClonk Forum
Up Topic New relaunch rule

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 Maikel
I cleaned up the script a bit, especially documented all setter functions:

  This rule enables and handles relaunches with its various aspects. These are:
   * SetInventoryTransfer(bool transfer): inventory of crew is transferred on respawn [default false].
   * SetFreeCrew(bool free): whether the crew is free or needs to be bought [default false].
   * SetBaseRespawn(bool set): whether to respawn at a nearby base [default false].
   * SetLastClonkRespawn(bool b): whether to respawn the last clonk only [default false].
   * SetRespawnDelay(int delay): respawn delay in seconds [default 10].
   * SetAllowPlayerRestart(bool on): whether a player can select restart in the rule menu.
   * SetPerformRestart(bool on): whether this rule actually handles the respawn [default true].
   * SetDefaultRelaunchCount(int r): the number of relaunches a player has [default nil == infinte].
   * SetInitialRelaunch(bool on): whether a relaunch on round start is done [default true].
  The active relaunch rule can be obtained by the global function GetRelaunchRule(). The rule also
  keeps track of player's actual number of relaunches which can be modified and accessed by:
   * SetPlayerRelaunchCount(int plr, int value): set player relaunch count.
   * GetPlayerRelaunchCount(int plr): get player relaunch count.
   * DoPlayerRelaunchCount(int plr, int value): add to player relaunch count.
   * HasUnlimitedRelaunches(): whether the players have infinite relaunches.

Still todo is proper scenario saving, but for now there is no round yet which places this object anywhere, so that is fine.

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill