So heres the top of the main script with the included scripts in order they are loaded
// Included files
include <gid01.wdl>;
include <display00.wdl>;
include <lflare.wdl>;
include <player.wdl>;
include <Gateworlds.wdl>;
include <dhdop.wdl>;
include <dhdopa.wdl>;
include <default.fx>;
include <mtlFX.wdl>;
include <MtlTerrainMulti.wdl>;
The function I want to call is defined in Gateworlds.wdl
Here now the script with the IMPACT function
It´s not written very clean so sry for that.
var the_gate = 2345678;
var the_gateb = 1234567;
var entered_number = 0;
string entry_line[8]; // ein leerer string
string adress = "ENTER GATE ADRESS";
sound horizon = <horizo.wav>;
sound gateclose = <gateclose.wav>;
sound chevs = <chevlock.wav>;
sound spin = <spinner.wav>;
sound openst = <gateopen1st.wav>;
sound opennd = <gateopen2nd.wav>;
string horizont = <eh3.mdl>;
string res1 = <planet2.wmb>;
string res2 = <eh3.mdl>;
var indicator = 0;
var my_pos[3];
var my_angle[3];
var_nsave gateoffen;
var_nsave drehen;
var x = 0;
var y = 0;
var b = 0;
var k = 0;
var l = 0;
define _alpha__00C, skill1;
define _vel_x__00C,skill2;
define _vel_y__00C,skill3;
define _vel_z__00C,skill4;
define _damage__00C, skill2;
var dhd;
var vektor[3];
var vektor2[3];
include <chevrons.wdl>;
include <chevronsa.wdl>;
text screen_txt // text objekt
{
font = _a4font;
pos_x = 260;
pos_y = 240;
}
function print(str)
{
screen_txt.string = str;
screen_txt.visible = on;
}
function scan_me()
{
my_pos.x = camera.x;
my_pos.y = camera.y;
my_pos.z = camera.z;
my_angle.pan = camera.pan;
my_angle.tilt = camera.tilt;
dhd.x = 120;
dhd.y = 180;
dhd.z = 300; // scan reichweite 200 quants
indicator = 1;
c_scan(camera.x,camera.pan,vector(120,0,200),dhd);
}
on_space = scan_me;
entity tor
{
type = <erdetorohnechevs.mdl>;
layer = 2;
flags = visible;
view = CAMERA;
}
Function ziela()
{
my.lightrange = 700;
my.Light = on;
my.blue = 255;
my.enable_impact = on; <------ That´s the Problem
my.event = level_A;
my._gid01_id = gid01_forcefield_const;
my.transparent = on;
my.alpha = 75;
vec_set(my._gid01_vel_x,my._vel_x__00C);
wait(1);
ent_playsound(tor, opennd , 1000);
wait(1);
gateoffen = ent_playloop(me,horizon,1000);
while (x < 3200)
{
x += 1;
my.skin = my.skill1 % 10;
my.skill1 += 0.5*time;
wait (1);
}
wait(1);
x -= 3200;
wait(1);
snd_stop (gateoffen);
wait(1);
ent_playsound(tor, gateclose, 1000);
wait (1);
while (y < 80)
{
y += 1;
my.skin = my.skill1 % 10; // Skins
my.skill1 += 0.5*time; // 5 skins pro second
wait (1);
}
wait(1);
y -= 80;
wait(1);
ent_remove(me);
wait(1);
}
function anwahl
{
if (entered_number == the_gate)
{
ziela();
}
else
{
ent_remove(me);
}
}
function check_gate
{
proc_kill(4);
waitt(16); // warte 16 ticks (1 sekunde)
print(adress);
sleep(1);
print(entry_line);
inkey(entry_line); // fordert eingabe der tastatur an
entered_number = str_to_num(entry_line); // konvertiert eingabe in eine zahlenfolge
drehen = ent_playloop(tor, spin, 1000);
sleep(4);
ent_playsound(tor, chevs, 1000);
ent_create (chevli1on,ch1,che1);
sleep(4);
ent_playsound(tor, chevs, 1000);
ent_create (chevli2on,ch2,che2);
sleep(4);
ent_playsound(tor, chevs, 1000);
ent_create (chevli3on,ch3,che3);
sleep(4);
ent_playsound(tor, chevs, 1000);
ent_create (chevli4on,ch4,che4);
sleep(4);
ent_playsound(tor, chevs, 1000);
ent_create (chevli5on,ch5,che5);
sleep(4);
ent_playsound(tor, chevs, 1000);
ent_create (chevli6on,ch6,che6);
sleep(4);
ent_playsound(tor, chevs, 1000);
ent_create (chevli7on,ch7,che7);
sleep(1);
snd_stop(drehen);
wait(4);
ent_playsound(tor, openst, 1000);
wait(1);
screen_txt.visible = off;
wait(17);
ent_create (horizont, vektor, anwahl);
}
function start
{ wait(1);
my.passable = on;
my.lightrange = 700;
my.Light = on;
my.blue = 255;
my._gid01_id = gid01_forcefield_const;
my.transparent = on;
my.alpha = 75;
vec_set(my._gid01_vel_x,my._vel_x__00C);
wait(1);
gateoffen = ent_playloop(me,horizon,1000);
while (k < 500)
{
k += 1;
my.skin = my.skill1 % 10;
my.skill1 += 0.5*time;
wait (1);
}
wait(1);
k -= 500;
wait(1);
snd_stop (gateoffen);
wait(1);
ent_playsound(tor, gateclose, 1000);
wait (1);
while (l < 75)
{
l += 1;
my.skin = my.skill1 % 10; // Skins
my.skill1 += 0.5*time; // 5 skins pro second
wait (1);
}
wait(1);
l -= 75;
wait(1);
ent_remove(me);
wait(1);
}
action dhd_akt
{
my.metal = on;
my.albedo = 30;
my.enable_scan = on;
my.event = check_gate;
}
P.S. This is the unmodified original Script
Last edited by MoRRoW; 08/14/09 14:13.