Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,649 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Startpanel #299757
11/26/09 17:03
11/26/09 17:03
Joined: Nov 2009
Posts: 8
S
Stef Offline OP
Newbie
Stef  Offline OP
Newbie
S

Joined: Nov 2009
Posts: 8
Hallo,

Ich möchte gerne ein Startpanel mit schwarzen Hintergrund, das automatisch in der Bildschirmmitte platziert wird Nach 3 Sekunden soll es abgeblendet werden (sozusagen dimmen) und das Level soll sichtbar sein.
Auch soll parallel zum Startpanel ein Sound gestartet werden.
Mein Code bisher:

Code:
////////////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>
////////////////////////////////////////////////////////////////////
//Bilder
BMAP* splash_tga = "arcania.jpg";

//Start Screen
PANEL* splash_screen =
{
	bmap = splash_tga;
	layer = 2;
	flags = SHOW;
}
////////////////////////////////////////////////////////////////////
function main()
{
	video_screen = 1; // start in full screen mode
	video_mode = 11;
	level_load ("demo.wmb");
}



Bisher wird das Logo während des Spieles oben links angezeigt. Aber das ist nicht das, was ich möchte.

Re: Startpanel [Re: Stef] #299774
11/26/09 21:19
11/26/09 21:19
Joined: Nov 2008
Posts: 354
saeculum II
MPQ Offline
Senior Member
MPQ  Offline
Senior Member

Joined: Nov 2008
Posts: 354
saeculum II
sth. like that:
Code:
void pan()
{
  wait(-3)// wait 3 sec
  while (pan.alpha > 0)
  {
    pan.alpha -= 10*time_step;
    wait(1);
  }
  ptr_remove (pan);
}



Last edited by MPQ; 11/26/09 21:20.

new project in early stage...

Intel Xeon X3450 2,66GHz | Mushkin 8 Gib | Zotac GTS250 + 7300LE | A8.3 com
Re: Startpanel [Re: MPQ] #299847
11/27/09 16:02
11/27/09 16:02
Joined: Nov 2009
Posts: 8
S
Stef Offline OP
Newbie
Stef  Offline OP
Newbie
S

Joined: Nov 2009
Posts: 8
Originally Posted By: MPQ
sth. like that:
Code:
void pan()
{
  wait(-3)// wait 3 sec
  while (pan.alpha > 0)
  {
    pan.alpha -= 10*time_step;
    wait(1);
  }
  ptr_remove (pan);
}



Thanks laugh

But I got an error:
Code:
PANEL* splash_screen =
{
	bmap = splash_jpg;
	layer = 2;
	flags = SHOW;
	}

void pan()
{
  wait(-3)// wait 3 sec
  while (pan.alpha > 0)
  {
    pan.alpha -= 10*time_step;
    wait(1);
  }
  ptr_remove (pan);
}


is this right.

Re: Startpanel [Re: Stef] #299852
11/27/09 17:23
11/27/09 17:23
Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67"...
hopfel Offline
User
hopfel  Offline
User

Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67"...
PANEL* splash_screen =
{
bmap = splash_jpg;
layer = 2;
flags = TRANSLUCENT | SHOW; //<-- Translucent, else you can't use alpha
}

function pan()
{
wait(-3); // <-- with semikolon
while (pan.alpha > 0)
{
pan.alpha -= 10*time_step;
wait(1);
}
ptr_remove(pan);
}


Last edited by hopfel; 11/27/09 17:24.

Hilf mir, dir zu helfen!
Re: Startpanel [Re: hopfel] #299889
11/27/09 21:51
11/27/09 21:51
Joined: Nov 2008
Posts: 354
saeculum II
MPQ Offline
Senior Member
MPQ  Offline
Senior Member

Joined: Nov 2008
Posts: 354
saeculum II
ok, here is the full code (I did not try it out):
Code:
PANEL* splash_screen =
{
  bmap = splash_jpg;
  layer = 2;
  flags = SHOW | TRANSLUCENT;
  alpha = 100;
}

void splash_screen_remove()
{
  wait(-3); //wait 3 seconds
  while (pan.alpha > 0)
  {
    splash_screen.alpha -= 10*time_step;
    wait(1);
  }
  ptr_remove(splash_screen);
}

//trigger the function within the main function
function main()
{
  ...
  splash_screen_remove();
}



Last edited by MPQ; 11/27/09 21:52.

new project in early stage...

Intel Xeon X3450 2,66GHz | Mushkin 8 Gib | Zotac GTS250 + 7300LE | A8.3 com

Gamestudio download | 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