|
Media play using template2
#229668
09/29/08 14:48
09/29/08 14:48
|
Joined: Jun 2006
Posts: 35 Texas
DancesWithLight
OP
Newbie
|
OP
Newbie
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
Serious User
|
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
DancesWithLight
OP
Newbie
|
OP
Newbie
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
Serious User
|
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: log2]
#229980
10/01/08 23:28
10/01/08 23:28
|
Joined: Dec 2006
Posts: 1,086 Queensland - Australia
Nidhogg
Serious User
|
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
|
|
|
|