Donnerstag, 13. Dezember 2007

Bling für Dagny

Ich habe mit der Programmierung in Second Life begonnen.



Auf Knopfdruck "blingt" der BH von Dagny.

Technisch:
Ich habe folgendes Script erstellt welches einen Partikel-Effekt startet und stoppt. Der Effekt wird über Chat-Befehle gesteuert. Damit Julia Nachtmann den Effekt möglichst einfach benutzen kann habe ich eine Geste eingerichtet, die den Chat-Befehl nutzt. Die Geste wird über eine Funktionstaste (F2) gestartet. Kurz: F2 = Bling.


list listenHandles;
integer once;
float blingTime = 0.7;

init() {
integer x;
for (x = 0; x < llGetListLength(listenHandles); x++) {
llListenRemove(llList2Integer(listenHandles, x)); // Remove old listen callback, since there is a maximum limit
}
listenHandles = []; // Clear the lis
listenHandles += llListen(10, "", llGetOwner(), "");
}

handleCmd(string msg) {
if (msg == "bling reset") {
llOwnerSay("Bling script resetting");
llResetScript();
}

}

default
{
state_entry()
{
init();
state off;
}

on_rez(integer start_param) {
init(); // Re-verify ownership of the script
state off;
}

}

state off {
state_entry()
{
llParticleSystem([]);
init();
}

on_rez(integer start_param) {
init(); // Re-verify ownership of the script
}

listen(integer channel, string name, key id, string message) {
once = 0;
if (message == "bling on") {
state on;
} else if (message == "bling once") {
once = 1;
state on;
} else {
handleCmd(message);
}
}
}

state on
{
state_entry()
{
llParticleSystem([PSYS_PART_FLAGS, PSYS_PART_EMISSIVE_MASK | PSYS_PART_INTERP_SCALE_MASK | PSYS_PART_FOLLOW_SRC_MASK | PSYS_PART_FOLLOW_VELOCITY_MASK,
PSYS_PART_MAX_AGE, 0.5,
PSYS_PART_START_COLOR, <1, 1, 1>,
PSYS_PART_START_SCALE, <0.08, 0.1, 0.08>,
PSYS_PART_END_SCALE, <0.03, 0.4, 0.03>,
PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_EXPLODE,
PSYS_SRC_BURST_RATE, 0.25,
PSYS_SRC_BURST_PART_COUNT, 6,
PSYS_SRC_BURST_RADIUS, 0.15,
PSYS_SRC_BURST_SPEED_MIN, 0.1,
PSYS_SRC_BURST_SPEED_MAX, 0.5,
PSYS_SRC_TARGET_KEY, llGetKey(),
PSYS_SRC_MAX_AGE, 0.0,
PSYS_PART_START_ALPHA, 0.85,
PSYS_PART_END_ALPHA, 0.0
]);
if (once == 1) {
llSleep(blingTime);
state off;
}
init();
}

on_rez(integer start_param) {
init(); // Re-verify ownership of the script
}

listen(integer channel, string name, key id, string message) {
if (message == "bling off") {
state off;
} else {
handleCmd(message);
}
}
}

1 Kommentar:

Anonym hat gesagt…

lost your money at the [url=http://www.realcazinoz.com]casino[/url] ?over 21 and looking where to [url=http://www.generic4you.com]buy viagra online[/url]? or even how to buy [url=http://www.avi.vg]adult toys[/url]? well you can try this websites and [url=http://www.rxpillsmd.net]buy viagra[/url]. [url=http://www.generic4you.com]sildenafil[/url] and [url=http://www.generic4you.com]generic viagra[/url] online. you can also buy [url=http://www.generik4u.com]viagra[/url] online.
so for [url=http://www.avi.vg]sex toys[/url] and [url=http://www.ewgpresents.com]viagra online[/url] check us ! for great [url=http://www.cahv.org]viagra[/url] deals check us now!