gibt es auch einen befehl, womit man den Spieler teleportieren kann, wenn er sich auf einem bestimmten gebiet befindet?

danke!
Code: Alles auswählen
function beam(int chas, int anz, int izz) {
SetCharacterTransparency(chas, 0);
Wait(5);
SetCharacterTransparency(chas, 10);
Wait(5);
SetCharacterTransparency(chas, 20);
Wait(5);
SetCharacterTransparency(chas, 30);
Wait(5);
SetCharacterTransparency(chas, 40);
Wait(5);
SetCharacterTransparency(chas, 50);
Wait(5);
SetCharacterTransparency(chas, 60);
Wait(5);
SetCharacterTransparency(chas, 70);
Wait(5);
SetCharacterTransparency(chas, 80);
Wait(5);
SetCharacterTransparency(chas, 90);
Wait(5);
SetCharacterTransparency(chas, 100);
Wait(5);
MoveCharacterBlocking(chas, anz, izz, 1);
Wait(80);
SetCharacterTransparency(chas, 100);
Wait(5);
SetCharacterTransparency(chas, 90);
Wait(5);
SetCharacterTransparency(chas, 80);
Wait(5);
SetCharacterTransparency(chas, 70);
Wait(5);
SetCharacterTransparency(chas, 60);
Wait(5);
SetCharacterTransparency(chas, 50);
Wait(5);
SetCharacterTransparency(chas, 40);
Wait(5);
SetCharacterTransparency(chas, 30);
Wait(5);
SetCharacterTransparency(chas, 20);
Wait(5);
SetCharacterTransparency(chas, 10);
Wait(5);
SetCharacterTransparency(chas, 0);
Wait(5);
}
Code: Alles auswählen
Beam(EGO, 17, 18);
Ihr könnt mich gerne berichtigen, wenn ihr wollt, ich bekomme das nämlich nicht in den Global Script (Undenifed token 'beam')Beam
Beam(int char, int x, int, y)
Beamt den Spieler an eine bestiimte Stelle im Raum.
CHAR ist der Charakter, der gebeamt wird.
X und Y sind die Koordinaten, an die gebeamt werden
Beispiel:
string didl;
InputBox("Wohin wollen Sie", didl);
if(StrComp(didl, "Tür") == 0) {
Beam(EGO, 31, 17);
}
else {
Display("Reiseziel nicht bekannt");
}
Code: Alles auswählen
function CharacterBeam(int chas, int anz, int izz, int sou, int mys) {
SetCharacterTransparency(chas, 0);
if(sou != 0) {
PlaySoundEx(sou, 5);
}
Wait(5);
SetCharacterTransparency(chas, 10);
Wait(5);
SetCharacterTransparency(chas, 20);
Wait(5);
SetCharacterTransparency(chas, 30);
Wait(5);
SetCharacterTransparency(chas, 40);
Wait(5);
SetCharacterTransparency(chas, 50);
Wait(5);
SetCharacterTransparency(chas, 60);
Wait(5);
SetCharacterTransparency(chas, 70);
Wait(5);
SetCharacterTransparency(chas, 80);
Wait(5);
SetCharacterTransparency(chas, 90);
Wait(5);
SetCharacterTransparency(chas, 100);
Wait(5);
character[chas].x =anz;
character[chas].x =izz;
Wait(80);
if(mys == 1) {
if(sou != 0) {
PlaySoundEx(sou, 5);
}
}
SetCharacterTransparency(chas, 100);
Wait(5);
SetCharacterTransparency(chas, 90);
Wait(5);
SetCharacterTransparency(chas, 80);
Wait(5);
SetCharacterTransparency(chas, 70);
Wait(5);
SetCharacterTransparency(chas, 60);
Wait(5);
SetCharacterTransparency(chas, 50);
Wait(5);
SetCharacterTransparency(chas, 40);
Wait(5);
SetCharacterTransparency(chas, 30);
Wait(5);
SetCharacterTransparency(chas, 20);
Wait(5);
SetCharacterTransparency(chas, 10);
Wait(5);
SetCharacterTransparency(chas, 0);
Wait(5);
}
Code: Alles auswählen
import function CharacterBeam(CHARID,int x,int y,int sound,int style);
Code: Alles auswählen
CharacterBeam(EGO, 15, 39, 0, 0);
Code: Alles auswählen
int i = 0;
while (i < 100) {
SetCharacterTransparency(chas, i);
Wait(5);
i += 10;
}
Code: Alles auswählen
function beam(int chas, int xpos, int ypos, int sound, int mys) {
int i = 0;
if(sound != 0) {
PlaySound(sound);
}
while (i < 100) {
SetCharacterTransparency(chas, i);
Wait(5);
i += 10;
}
MoveCharacterBlocking(chas, xpos, ypos);
If(Sound != 0) {
if(mys == 1) {
PlaySound(sound);
}
}
int a = 100;
while (a > 0) {
SetCharacterTransparency(chas, a);
Wait(5);
i -= 10;
}