Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 946 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Media play using template2 #229668
09/29/08 14:48
09/29/08 14:48
Joined: Jun 2006
Posts: 35
Texas
D
DancesWithLight Offline OP
Newbie
DancesWithLight  Offline OP
Newbie
D

Joined: Jun 2006
Posts: 35
Texas
Why doesn't this show a bitmap when I start the main?
Before this I put
bmap warning = "warning.bmp";
//my warning screen bmp in game directory

media_play("gentle.wav",bmap_for_entity(warning,0),100);


Waiting for fully immersible Virtual reality.
Re: Media play using template2 [Re: DancesWithLight] #229702
09/29/08 18:30
09/29/08 18:30
Joined: Dec 2006
Posts: 1,086
Queensland - Australia
Nidhogg Offline
Serious User
Nidhogg  Offline
Serious User

Joined: Dec 2006
Posts: 1,086
Queensland - Australia
Did you create the bmap first..

bmap warning
function call_warning()
{
var warning_msg;

warning_msg = media_play("warning.wav"),warning,100);
}

The above code is untested but I think that's how it should be done.


Windows XP SP3
Intel Dual Core CPU: E5200 @ 2.5GHz
4.00GB DDR3 Ram
ASUS P5G41T-M LX
PCIE x16 GeForce GTS 450 1Gb
SB Audigy 4
Spyware Doctor with AntiVirus
Re: Media play using template2 [Re: Nidhogg] #229711
09/29/08 19:49
09/29/08 19:49
Joined: Jun 2006
Posts: 35
Texas
D
DancesWithLight Offline OP
Newbie
DancesWithLight  Offline OP
Newbie
D

Joined: Jun 2006
Posts: 35
Texas
Well, the bitmap is white letters on a black background. I don't know what they mean by a 16 bit pcx or bitmap form. My paintshop only let me choose 24 bit. It jumps from a choice of 256 colors to 24 bit 65 million colors. But it shows up fine in a panel. And I use them for sprites and they show up. The bitmap is in the game directory with the models and sprites. Maybe it only lets me show a bitmap if I'm using it as a model to project a movie on, which I can't do, because I only have the Standard version, and can only use media play for midi files and wavfles. But I thought it would show a bitmap at the same time.

Maybe I'd better just use a panel function to show a bitmap and play a music. Like:

//define the panel correctly then...
function warning()
{text_pan.visible=on;
media_play(music.wav,100);
sleep(3); //give them time to read the message
text_pan.visible = off;
wait(1);
}

This works at the start of a game. I'd also like to attach a function like this to a trigger, to use similar code in other functions. Then I could have messages pop up when the player walks into certain places. But I have less luck writing triggering code to attach to invisible objects. Template2 has some triggers, but I don't know how to identify a particular trigger with a function I write. Need a trigger tutorial.

Thanks
Anton

Last edited by DancesWithLight; 09/29/08 19:50.

Waiting for fully immersible Virtual reality.
Re: Media play using template2 [Re: DancesWithLight] #229758
09/30/08 02:15
09/30/08 02:15
Joined: Dec 2006
Posts: 1,086
Queensland - Australia
Nidhogg Offline
Serious User
Nidhogg  Offline
Serious User

Joined: Dec 2006
Posts: 1,086
Queensland - Australia
What version are you using. whay I ask is becuase if you are using
version A6 some of the code is new. Example sleep(3) is now wait(-3)

Maybe you should do a tutorial or refer to the manual...


Windows XP SP3
Intel Dual Core CPU: E5200 @ 2.5GHz
4.00GB DDR3 Ram
ASUS P5G41T-M LX
PCIE x16 GeForce GTS 450 1Gb
SB Audigy 4
Spyware Doctor with AntiVirus
Re: Media play using template2 [Re: Nidhogg] #229880
10/01/08 09:51
10/01/08 09:51
Joined: Sep 2008
Posts: 29
L
log2 Offline
Newbie
log2  Offline
Newbie
L

Joined: Sep 2008
Posts: 29
also if you're defining a bmap, it needs to be BMAP, not bmap, aka caps... just incase it's not

Re: Media play using template2 [Re: log2] #229980
10/01/08 23:28
10/01/08 23:28
Joined: Dec 2006
Posts: 1,086
Queensland - Australia
Nidhogg Offline
Serious User
Nidhogg  Offline
Serious User

Joined: Dec 2006
Posts: 1,086
Queensland - Australia
caps doesn't matter with c-script as it's case insenseitive, where as lite-c is


Windows XP SP3
Intel Dual Core CPU: E5200 @ 2.5GHz
4.00GB DDR3 Ram
ASUS P5G41T-M LX
PCIE x16 GeForce GTS 450 1Gb
SB Audigy 4
Spyware Doctor with AntiVirus
Re: Media play using template2 [Re: Nidhogg] #230104
10/02/08 20:57
10/02/08 20:57
Joined: Sep 2008
Posts: 29
L
log2 Offline
Newbie
log2  Offline
Newbie
L

Joined: Sep 2008
Posts: 29
ah ok, well that's good to know, but still think it looks better, haha, but thanks for the info


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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