Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, ozgur, AbrahamR, wdlmaster), 849 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Third Person Camera funktioniert nicht! #315280
03/14/10 14:12
03/14/10 14:12
Joined: Mar 2010
Posts: 23
U
Undefined Offline OP
Newbie
Undefined  Offline OP
Newbie
U

Joined: Mar 2010
Posts: 23
Hallo,
Ich habe nun ein kleines Minispiel gestartet (also das Projekt gestartet) aber wenn ich es Compile und Ausführe ist eine Free Camera vorhanden. Ich habe ein Skript erstellt und habe dann "A7_liteC_project" ausgewählt. Hab es auch schon mit WalkThru ausprobiert. Dieses Programm macht mir echt Probleme...

Re: Third Person Camera funktioniert nicht! [Re: Undefined] #315629
03/17/10 18:50
03/17/10 18:50
Joined: Jun 2008
Posts: 146
Deutschland
M
M4sterm1nd Offline
Member
M4sterm1nd  Offline
Member
M

Joined: Jun 2008
Posts: 146
Deutschland
ähm was erhoffst du dir jetzt für Antworten?
Ist nicht böse gemeint aber selbst die gamestudio comunity kann nicht hellsehen.
was funktioniert denn nicht? hast du code dazu geschrieben? wie sieht der aus?

Re: Third Person Camera funktioniert nicht! [Re: M4sterm1nd] #315634
03/17/10 19:16
03/17/10 19:16
Joined: Mar 2010
Posts: 23
U
Undefined Offline OP
Newbie
Undefined  Offline OP
Newbie
U

Joined: Mar 2010
Posts: 23
Tschuldigung,
Ich bin auf File>Map Properities>New Script
Nun bin ich in den Project Manager, habe die Free Camera entfernt und die Thirdperson Kamera "geaddet". Habe noch Biped Player hinzugefügt.
Dann habe ich meinem Player Modell die Funktion BipedPlayer1 (oder so) zugewiesen.
Das komische:
Bei Gamestudio A6 geht es:
http://www.youtube.com/watch?v=6c8NcuGtn08

Könnt ihr mir bitte helfen?

Re: Third Person Camera funktioniert nicht! [Re: Undefined] #315639
03/17/10 19:35
03/17/10 19:35
Joined: Mar 2010
Posts: 23
U
Undefined Offline OP
Newbie
Undefined  Offline OP
Newbie
U

Joined: Mar 2010
Posts: 23
Ich möchte aber das es mit A7 auch geht...

Re: Third Person Camera funktioniert nicht! [Re: Undefined] #315731
03/18/10 16:25
03/18/10 16:25
Joined: Jun 2008
Posts: 146
Deutschland
M
M4sterm1nd Offline
Member
M4sterm1nd  Offline
Member
M

Joined: Jun 2008
Posts: 146
Deutschland
ist nicht schlimm wir haben ja alle mal angefangen wink

zu den templates kann ich dir garnicht so viel sagen habe ich nie benutzt immer nur selber geproggt.

wie du selbst ne 3.person cam schreibst das könnte ich dir sagen.

schau mal die aum´s durch ich glaub da gabs was in der richtung auch mit templates

Re: Third Person Camera funktioniert nicht! [Re: M4sterm1nd] #315732
03/18/10 16:42
03/18/10 16:42
Joined: Mar 2010
Posts: 23
U
Undefined Offline OP
Newbie
Undefined  Offline OP
Newbie
U

Joined: Mar 2010
Posts: 23
Kannst du mir mal den Quellcode für ne Third Person Camera sagen? Muss das dann in die function main() ?

Re: Third Person Camera funktioniert nicht! [Re: Undefined] #315741
03/18/10 17:47
03/18/10 17:47
Joined: Jun 2008
Posts: 146
Deutschland
M
M4sterm1nd Offline
Member
M4sterm1nd  Offline
Member
M

Joined: Jun 2008
Posts: 146
Deutschland
function third_person_cam(); // das muss ganz oben vor die main

function third_person_cam() // das muss irgendwo hin ABER NICHT IN DIE MAIN

{
while (player == null) {wait (1);} // warten bis der spieler existiert (kannst du auch weglassen glaub ich)

camera.tilt = -15; // kuckt etwas runter zum spieler musst du austesten

while (1)

{

camera.x = player.x - 250 * cos(player.pan); // 250 = distance zwischen camera und spieler

camera.y = player.y - 250 * sin(player.pan); //

camera.z = player.z + 150; // camera über dem spieler 150 ist die höhe

camera.pan = player.pan; // camer kuckt in die selbe richtung wie der spieler

wait (1);

}
}

//und das schreibst du dann in die main() aber an die richtige stelle weiß nicht wie dein code aussieht deswegen kann ich dir diese nicht sagen

function third_person_cam();


Last edited by M4sterm1nd; 03/18/10 17:55.
Re: Third Person Camera funktioniert nicht! [Re: M4sterm1nd] #315749
03/18/10 18:22
03/18/10 18:22
Joined: Mar 2010
Posts: 23
U
Undefined Offline OP
Newbie
Undefined  Offline OP
Newbie
U

Joined: Mar 2010
Posts: 23
Danke,
weißt keinen Fehler auf. Wenn ich jedoch das Spiel starte ist alles nur schwarz.

Re: Third Person Camera funktioniert nicht! [Re: Undefined] #315750
03/18/10 18:28
03/18/10 18:28
Joined: Jun 2008
Posts: 146
Deutschland
M
M4sterm1nd Offline
Member
M4sterm1nd  Offline
Member
M

Joined: Jun 2008
Posts: 146
Deutschland
was steht denn noch in der main?
wird ein level geladen?
wo hast du "function third_person_cam();" hingeschrieben?

#EDIT: richtiges scripten ist etwas anders als mit den templates zu fummeln

Last edited by M4sterm1nd; 03/18/10 18:33.
Re: Third Person Camera funktioniert nicht! [Re: M4sterm1nd] #315751
03/18/10 19:03
03/18/10 19:03
Joined: Mar 2010
Posts: 23
U
Undefined Offline OP
Newbie
Undefined  Offline OP
Newbie
U

Joined: Mar 2010
Posts: 23
Das komplette Lite-C-Skript:
////////////////////////////////////////////////////////////////////////
// A6 "Walk Thru" Project wdl:
// Created by WED.
////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////
// The PATH keyword gives directories where template files can be found.
path "C:\\Program Files\\Game Studio 7 Gratisversion\\template_6"; // Path to A6 templates directory
path "C:\\Program Files\\Game Studio 7 Gratisversion\\template_6\\code"; // Path to A6 template code subdirectory
path "C:\\Program Files\\Game Studio 7 Gratisversion\\templates\\images"; // Path to template image subdirectory
path "C:\\Program Files\\Game Studio 7 Gratisversion\\templates\\sounds"; // Path to template sound subdirectory
path "C:\\Program Files\\Game Studio 7 Gratisversion\\templates\\models"; // Path to template model subdirectory

/////////////////////////////////////////////////////////////////
// Filename of the starting level.
string level_str = <engine.WMB>; // give file names in angular brackets

////////////////////////////////////////////////////////////////////////////
// Included files
include <gid01.wdl>; // global ids
include <display00.wdl>; // basic display settings
include <plSelect.wdl>;
include <cameraTarget.wdl>;
include <miscInput01.wdl>;
include <plBipedInput01.wdl>;
include <bipedPhy01.wdl>;
include <bipedAnim01.wdl>;
include <bipedSnd01.wdl>;
include <plBiped01.wdl>;
include <cameraSelect.wdl>;
include <camera1stPerson01.wdl>;





/////////////////////////////////////////////////////////////////
// Desc: The main() function is started at game start
unction third_person_cam(); // das muss ganz oben vor die main

function third_person_cam() // das muss irgendwo hin ABER NICHT IN DIE MAIN

{
while (player == null) {wait (1);} // warten bis der spieler existiert (kannst du auch weglassen glaub ich)

camera.tilt = -15; // kuckt etwas runter zum spieler musst du austesten

while (1)

{

camera.x = player.x - 250 * cos(player.pan); // 250 = distance zwischen camera und spieler

camera.y = player.y - 250 * sin(player.pan); //

camera.z = player.z + 150; // camera über dem spieler 150 ist die höhe

camera.pan = player.pan; // camer kuckt in die selbe richtung wie der spieler

wait (1);

}
}
function main()
{
function third_person_cam();
// set some common flags and variables
// freeze all entity functions
freeze_mode = 1;
// no level has been loaded yet...
gid01_level_state = gid01_level_not_loaded;

// entry: Warning Level (0,1, or 2)
// entry_help: Sets sensitivity to warnings (0 = none, 1 = some, 2 = all).
warn_level = 2; // announce bad texture sizes and bad wdl code


// entry: Starting Mouse Mode (0, 1, or 2)
mouse_mode = 0;

// wait 3 frames (for triple buffering) until it is flipped to the foreground
wait(3);

// now load the level
level_load(level_str);

wait(2); // let level load
// level should be loaded at this point...
gid01_level_state = gid01_level_loaded;

//+++ load starting values


// un-freeze the game
freeze_mode = 0;

// save start of game here
wait(6); // allow time for functions that wait for "gid01_level_loaded" to load
file_delete("start0.SAV"); // remove any old savefile
wait(1);
if( game_save("start",0,SV_ALL) <= 0)
{
diag("\nWARNING! main - Cannot save 'start' of level (ignore on restarts).");
}
else
{
diag("\nWDL: main - Game 'start' saved.");
}


// main game loop
while(1)
{
if(gid01_level_state != gid01_level_loaded)
{
freeze_mode = 1; // pause the game
while(gid01_level_state != gid01_level_loaded) { wait(1); }
freeze_mode = 0; // resume the game
}
wait(1);
}

}


// Desc: this is the function used to restart the game.
function main_restart_game()
{
// wait 3 frames (for triple buffering) until it is flipped to the foreground
wait(3);

// freeze the game
freeze_mode = 1;

if( game_load("start",0) <= 0)
{
diag("\nWARNING! main_restart_game - Cannot load 'start' of level.");
}
else
{
diag("\nWDL: main_restart_game - Game 'start' loaded");
}

// un-freeze the game
freeze_mode = 0;
}


// Desc: this is the function used to quit the game.
function main_quit()
{
//+++ // save global skills & strings
exit;
}

/////////////////////////////////////////////////////////////////
// The following definitions are for the pro edition window composer
// to define the start and exit window of the application.
WINDOW WINSTART
{
TITLE "3D GameStudio";
SIZE 480,320;
MODE IMAGE; //STANDARD;
BG_COLOR RGB(240,240,240);
FRAME FTYP1,0,0,480,320;
// BUTTON BUTTON_START,SYS_DEFAULT,"Start",400,288,72,24;
BUTTON BUTTON_QUIT,SYS_DEFAULT,"Abort",400,288,72,24;
TEXT_STDOUT "Arial",RGB(0,0,0),10,10,460,280;
}

/* no exit window at all..
WINDOW WINEND
{
TITLE "Finished";
SIZE 540,320;
MODE STANDARD;
BG_COLOR RGB(0,0,0);
TEXT_STDOUT "",RGB(255,40,40),10,20,520,270;

SET FONT "",RGB(0,255,255);
TEXT "Any key to exit",10,270;
}*/


/////////////////////////////////////////////////////////////////
//INCLUDE <debug.wdl>;

Noch ne Frage:
Wie kann ich an der Position x0 y0 einen Text anzeigen lassen?

Page 1 of 2 1 2

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1