Second Life/Selfreplication: Unterschied zwischen den Versionen
aus Metalab Wiki, dem offenen Zentrum für meta-disziplinäre Magier und technisch-kreative Enthusiasten.
Zur Navigation springenZur Suche springenK |
|||
Zeile 1: | Zeile 1: | ||
− | |||
− | |||
− | + | == code == | |
− | rez_child() | + | integer ttl = 3; |
− | { | + | |
− | + | ||
+ | |||
+ | rez_child() | ||
+ | { | ||
if(ttl > 0) | if(ttl > 0) | ||
{ | { | ||
− | |||
integer ttl_child = ttl - 1; | integer ttl_child = ttl - 1; | ||
− | |||
llRezObject("1000er", llGetPos()+<1.5,0,0>, <0,0,0>, llEuler2Rot(<0,90,0> * DEG_TO_RAD) , ttl_child); | llRezObject("1000er", llGetPos()+<1.5,0,0>, <0,0,0>, llEuler2Rot(<0,90,0> * DEG_TO_RAD) , ttl_child); | ||
} | } | ||
− | } | + | } |
− | default | + | default |
− | { | + | { |
− | + | ||
touch_start(integer total_number) | touch_start(integer total_number) | ||
{ | { | ||
Zeile 28: | Zeile 27: | ||
− | |||
object_rez(key child) | object_rez(key child) | ||
{ | { | ||
− | |||
llGiveInventory(child, llKey2Name(child)); | llGiveInventory(child, llKey2Name(child)); | ||
} | } | ||
− | + | ||
− | + | ||
− | |||
on_rez(integer ttl_in) | on_rez(integer ttl_in) | ||
{ | { | ||
− | |||
ttl = ttl_in; | ttl = ttl_in; | ||
} | } | ||
− | |||
− | |||
− | |||
changed(integer change) | changed(integer change) | ||
{ | { | ||
Zeile 54: | Zeile 46: | ||
} | } | ||
} | } | ||
− | } | + | } |
Version vom 5. April 2007, 22:05 Uhr
code
integer ttl = 3;
rez_child() { if(ttl > 0) { integer ttl_child = ttl - 1; llRezObject("1000er", llGetPos()+<1.5,0,0>, <0,0,0>, llEuler2Rot(<0,90,0> * DEG_TO_RAD) , ttl_child); } }
default {
touch_start(integer total_number) { rez_child(); }
object_rez(key child) { llGiveInventory(child, llKey2Name(child)); } on_rez(integer ttl_in) { ttl = ttl_in; }
changed(integer change) { if(change == CHANGED_INVENTORY) { rez_child(); } } }