|
2 registered members (Grant, AndrewAMD),
911
guests, and 9
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Crash in... can´t fix it..
#218495
07/29/08 00:11
07/29/08 00:11
|
Joined: Mar 2008
Posts: 2,247 Baden Württemberg, Germany
Espér
OP
Expert
|
OP
Expert
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
|
ok.. this is the action:
action titelheld()
{
Titel_ent = my;
my.x = 0;
my.y = 11280;
my.z = 0;
my.pan = 90;
}
It just sais, "Crash in Titelheld()" Any idea what´s wrong??
|
|
|
Re: Crash in... can´t fix it..
[Re: croman]
#218579
07/29/08 11:19
07/29/08 11:19
|
Joined: Mar 2008
Posts: 2,247 Baden Württemberg, Germany
Espér
OP
Expert
|
OP
Expert
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
|
No.. don´t work... Here´s the complete code.. perhaps it causes somewhere else..:
///////////////////////////////
#include <acknex.h>
#include <default.c>
#include "shader.c"
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
var speed = 1;
var numbers = 0;
var prozentgeber = 1.0;
var intro_part_1_ende = 0;
var remover = 0;
ENTITY* Titel_ent;
ENTITY* schrift;
ENTITY* schrift2;
ENTITY* schrift3;
ENTITY* starry;
BMAP* titeltextstring = "leer.tga";
PANEL* titeltextpan =
{
pos_x = 0;
pos_y = 680;
layer = 100;
bmap = titeltextstring;
flags = VISIBLE;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
action titelheld()
{
wait(3);
Titel_ent = my;
my.x = 0;
my.y = 11280;
my.z = 0;
my.pan = 90;
my.material = Normal_mapping;
}
action nouncers()
{
my.pan = -90;
my.tilt = 360;
my.roll = 0;
my.x = Titel_ent.x;
my.z = Titel_ent.z;
while(Titel_ent.y >= 2500)
{
if((Titel_ent.y + 1000) <= my.y)
{
my.scale_y -= 0.5*time_step;
my.scale_x -= 0.5*time_step;
my.scale_z -= 0.5*time_step;
}
wait(1);
}
ent_remove(my);
}
action titelschrift()
{
schrift = my;
}
action titelschrift2()
{
schrift2 = my;
}
action titelschrift3()
{
schrift3 = my;
}
action star_x()
{
while(1)
{
if(intro_part_1_ende == 1){my.y -= (2*prozentgeber)*time_step;}
wait(1);
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function texter()
{
while(Titel_ent.y >= (-8300))
{
if(Titel_ent.y <= (-3900))
{
if(Titel_ent.y >= (-4000)){titeltextstring = "TXT_1.tga";}
if(Titel_ent.y >= (-5000)){titeltextstring = "TXT_2.tga";}
if(Titel_ent.y >= (-6000)){titeltextstring = "TXT_3.tga";}
if(Titel_ent.y >= (-7000)){titeltextstring = "TXT_4.tga";}
if(Titel_ent.y >= (-8000)){titeltextstring = "TXT_5.tga";}
if(Titel_ent.y <= (-8200)){titeltextstring = "leer.tga";}
}
wait(1);
}
}
function camcontroll()
{
while(1)
{
if (key_cul == 1){Titel_ent.pan += 10*time_step;}
if (key_cur == 1){Titel_ent.pan -= 10*time_step;}
if (key_r == 1){Titel_ent.pan = 90;}
if (key_shiftl == 1){speed = 3;}
if (key_shiftl == 0){speed = 1;}
wait(5);
}
}
action galaxy()
{
my.pan = Titel_ent.pan;
my.tilt = random(360);
my.roll = random(360);
my.flags |= (BRIGHT | PASSABLE);
while(1)
{
if(intro_part_1_ende == 1){my.y -= (2*prozentgeber)*time_step;}
wait(1);
}
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// KAMERA SETUP
//
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function camera_setting()
{
camera.x = Titel_ent.x; // X
camera.y = Titel_ent.y; // Y
camera.z = Titel_ent.z; // Höhe
camera.pan = Titel_ent.pan; // Zum Spieler drehen
wait(1);
}
function starter()
{
texter();
while(Titel_ent.y >= -11000)
{
Titel_ent.y -= 20*time_step;
wait(1);
}
while(Titel_ent.y >= -12000)
{
Titel_ent.y -= 20*time_step;
if(Titel_ent.x != -176){Titel_ent.x -= 2*time_step;}
if(Titel_ent.z != 64){Titel_ent.z += 1*time_step;}
schrift2.y = schrift.y + 50;
schrift3.y = -11860;
wait(1);
}
while(Titel_ent.y >= -13000)
{
Titel_ent.y -= 20*time_step;
schrift2.y = schrift.y + 50;
schrift3.y = -11860;
wait(1);
}
while(Titel_ent.y >= -13650)
{
Titel_ent.y -= (20*prozentgeber)*time_step;
if(prozentgeber >= 0.1){prozentgeber *= 0.98;}
schrift2.y = schrift.y + 50;
schrift3.y = -11860;
wait(1);
}
prozentgeber = 0.5;
wait(1);
while(schrift.y <= 13000)
{
intro_part_1_ende = 1;
schrift.y += (2*prozentgeber)*time_step;
schrift.alpha -= 0.2*prozentgeber;
schrift.scale_y -= 0.5*prozentgeber;
schrift.scale_x -= 0.5*prozentgeber;
schrift2.y += (2*prozentgeber)*time_step;
schrift2.alpha -= 0.2*prozentgeber;
schrift2.scale_y /= 1.1*prozentgeber;
schrift3.y += (2*prozentgeber)*time_step;
schrift3.alpha -= 0.2*prozentgeber;
prozentgeber *= 1.02;
wait(1);
}
schrift.y = 14000;
schrift2.y = 14050;
wait(-5);
sys_exit("Titeltest ende!");
}
function randomstars()
{
while(numbers <= 700)
{
var zufall = random(400);
if (zufall <= 50)
{
ent_create("Star_01.tga",vector((-5600+(random(11200))),(-5600+(random(11200))),(-4000+(random(8000)))),star_x);
numbers += 1;
}
if (zufall >= 50 && zufall <= 100)
{
ent_create("Star_02.tga",vector((-5600+(random(11200))),(-5600+(random(11200))),(-4000+(random(8000)))),star_x);
numbers += 1;
}
if (zufall >= 100 && zufall <= 380)
{
ent_create("Star_03.tga",vector((-5600+(random(11200))),(-5600+(random(11200))),(-4000+(random(8000)))),star_x);
numbers += 1;
}
if (zufall >= 398)
{
ent_create("Star_04.tga",vector((-5600+(random(11200))),(-5600+(random(11200))),(-4000+(random(8000)))),galaxy);
numbers += 1;
}
wait(1);
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function main()
{
fps_max = 60;
video_mode = 7;
level_load("Titel_Hauptmenü.WMB");
wait(2);
while(key_l ==0)
{
wait(1);
}
starter();
randomstars();
camcontroll();
camera.tilt = 0;
camera.roll = 0;
while(1)
{
camera_setting();
wait(1);
}
}
EDIT: Problem is greater.. if i delete the Titelheld() action, the next action gives the same crash.. .
Last edited by xXReapeRXx; 07/29/08 11:24.
|
|
|
Re: Crash in... can´t fix it..
[Re: Joozey]
#218593
07/29/08 12:51
07/29/08 12:51
|
Joined: Mar 2008
Posts: 2,247 Baden Württemberg, Germany
Espér
OP
Expert
|
OP
Expert
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
|
the problem came up before i added the shader.c ... but here is it:
MATERIAL* heldenshader_1 =
{
flags = ENABLE_RENDER;
effect = "s_P_cartoon.fx";
}
MATERIAL* Hitzewelle =
{
flags = TANGENT;
effect = "s_P_heatHaze.fx";
}
MATERIAL* Normal_mapping =
{
effect = "normalmap.fx";
}
|
|
|
Re: Crash in... can´t fix it..
[Re: Joozey]
#218598
07/29/08 13:16
07/29/08 13:16
|
Joined: Mar 2008
Posts: 2,247 Baden Württemberg, Germany
Espér
OP
Expert
|
OP
Expert
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
|
wait.. plz in a normal language and a bit slower again ^^ I´m german.. so i don´t understand every gramatical sentence you write ^^.. sry
I edited my Script to:
ENTITY* Titel_ent = NULL; ENTITY* schrift = NULL; ENTITY* schrift2 = NULL; ENTITY* schrift3 = NULL; ENTITY* starry = NULL;
to that while thing.. The Titelheld() and the beginning of Nouncer() are only played once.. not more... just one time..
Last edited by xXReapeRXx; 07/29/08 13:21.
|
|
|
Re: Crash in... can´t fix it..
[Re: Espér]
#218615
07/29/08 14:18
07/29/08 14:18
|
Joined: Oct 2004
Posts: 4,134 Netherlands
Joozey
Expert
|
Expert
Joined: Oct 2004
Posts: 4,134
Netherlands
|
But no crash? The Titelheld() and the beginning of Nouncer() are only played once.. not more... just one time.. Well yeah it's logic that it's only run once. The Titelheld() is not in a loop, so it only is performed one time. The nouncers() while or if branch probably do not match the conditions (Titel_ent.y + 1000) <= my.y) But I don't know what the values are for that 'my' entity. If it is only ran once and then removed, then obviously it did not stay in the while/if loop.
Last edited by Joozey; 07/29/08 14:25.
Click and join the 3dgs irc community! Room: #3dgs
|
|
|
|