Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
archiv:opensim:downloads:scripts:radio [2024/01/24 16:39] – Externe Bearbeitung 127.0.0.1 | archiv:opensim:downloads:scripts:radio [Unbekanntes Datum] (aktuell) – Externe Bearbeitung (Unbekanntes Datum) 127.0.0.1 | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
+ | ===== Radio ===== | ||
+ | |||
+ | Mit diesem Script kann man durch klicken auf ein Prim die Musik auf einer Region ein-, aus- und umschalten. Die Zulieferer der Musik können auf die eigenen Wünsche angepasst werden. | ||
+ | |||
+ | < | ||
+ | integer totalNum = 4; | ||
+ | integer currentNum = 1; | ||
+ | string currentstation; | ||
+ | string currenturl; | ||
+ | |||
+ | string id1 = "Radio Off"; | ||
+ | string id2 = " | ||
+ | string id3 = " | ||
+ | string id4 = " | ||
+ | string id5 = "KTRU Radio"; | ||
+ | string url1 = ""; | ||
+ | string url2 = " | ||
+ | string url3 = " | ||
+ | string url4 = " | ||
+ | string url5 = " | ||
+ | |||
+ | setNumber() | ||
+ | { | ||
+ | if (currentNum == 1) | ||
+ | { | ||
+ | currentstation = id1; | ||
+ | currenturl = url1; | ||
+ | } | ||
+ | else if (currentNum == 2) | ||
+ | { | ||
+ | currentstation = id2; | ||
+ | currenturl = url2; | ||
+ | } | ||
+ | else if (currentNum == 3) | ||
+ | { | ||
+ | currentstation = id3; | ||
+ | currenturl = url3; | ||
+ | } | ||
+ | else if (currentNum == 4) | ||
+ | { | ||
+ | currentstation = id4; | ||
+ | currenturl = url4; | ||
+ | } | ||
+ | else if (currentNum == 5) | ||
+ | { | ||
+ | currentstation = id5; | ||
+ | currenturl = url5; | ||
+ | } | ||
+ | llSetText(currentstation, | ||
+ | llSetParcelMusicURL(currenturl); | ||
+ | |||
+ | } | ||
+ | |||
+ | default | ||
+ | { | ||
+ | state_entry() | ||
+ | { | ||
+ | llSetText(" | ||
+ | } | ||
+ | touch_start(integer total_number) | ||
+ | { | ||
+ | currentNum += 1; | ||
+ | if (currentNum > totalNum) currentNum = 1; | ||
+ | setNumber(); | ||
+ | } | ||
+ | } | ||
+ | </ | ||