Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
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
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Akow, TipmyPip, tomaslolo), 788 guests, and 11 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Music handles #36746
11/24/04 03:45
11/24/04 03:45
Joined: Jan 2003
Posts: 710
T
Templar Offline OP
Developer
Templar  Offline OP
Developer
T

Joined: Jan 2003
Posts: 710
Hi, can anyone please explain to me what happens to media handles that get saved with a saved game? Say I'm playing a song and save the game in the middle of the song. What happens after I load the game? I tried it and it seems to me that music does play but it starts right from the start. How can that be prevented - or, to put it straight - is there any way of restoring a game and start the music where it was when the game was saved?

thanks

Re: Music handles [Re: Templar] #36747
11/24/04 04:09
11/24/04 04:09
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
you have to get the current position of your clip, and then jump to this position. the engine doesn't handle this separately, so you've got to write code for it (but in most cases, you should use var_nsave for handles).

joey.

Re: Music handles [Re: Joey] #36748
11/24/04 06:26
11/24/04 06:26
Joined: Jan 2003
Posts: 710
T
Templar Offline OP
Developer
Templar  Offline OP
Developer
T

Joined: Jan 2003
Posts: 710
thanks joey!

Quote:


you have to get the current position of your clip, and then jump to this position




but that's kinda problematic, isn't it? I may be wrong but I think that you can't play any media from any other position than it's start.

Re: Music handles [Re: Templar] #36749
11/25/04 00:27
11/25/04 00:27
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
you could play the media at a very high speed for one second without volume (it's possible, isn't it?). then let it run normal speed and turn up volume. just a guess, i think this could work.

Re: Music handles [Re: Joey] #36750
11/25/04 13:16
11/25/04 13:16

A
Anonymous
Unregistered
Anonymous
Unregistered
A



It may only be possible to do it via DLL but not in C-Script. If you're learning C# (and not C++, which C++ takes a lot of time to learn and master), you might want to wait for Conitec to migrate their C++ code over to .net (or maybe not but I'm hoping that if Conitec want to test 3DGS for new version of Windows code-named Longhorn, then Conitec will need to port 3DGS over to .net to make it work for Longhorn).

Anyway, sorry and I didn't mean to hijack your thread--but I just though I'd let you know if you don't want to learn C++ but would like to have a feature for saving song position for that song, which is not possible with C-Script.

Regards,
Grayson Peddie

Re: Music handles #36751
11/25/04 17:10
11/25/04 17:10
Joined: Jan 2003
Posts: 710
T
Templar Offline OP
Developer
Templar  Offline OP
Developer
T

Joined: Jan 2003
Posts: 710
Thanks for your replies, guys!

Re: Music handles #36752
11/25/04 21:09
11/25/04 21:09
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
actually it's possible as i said...
Code:
// time jumping needs, should be 1

var jump_time = 1;

// moves pos seconds forwards
function media_jump(handle, pos, vol) //media handle, position in seconds (!), volume after jumping
{
media_tune(handle, 0.1 /*or 1, i don't know*/, 100 * pos * (1/jump_time), 0);
sleep(jump_time);
media_tune(handle, vol, 100, 0);
}



joey.

Re: Music handles [Re: Joey] #36753
11/27/04 08:19
11/27/04 08:19
Joined: Jan 2003
Posts: 710
T
Templar Offline OP
Developer
Templar  Offline OP
Developer
T

Joined: Jan 2003
Posts: 710
cool! thanks!


Moderated by  HeelX, Spirit 

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