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
0 registered members (), 1,397 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
snd_tune #162033
10/19/07 03:00
10/19/07 03:00
Joined: Oct 2007
Posts: 42
Minnesota, USA
Techd Offline OP
Newbie
Techd  Offline OP
Newbie

Joined: Oct 2007
Posts: 42
Minnesota, USA
I keep getting these errors: keyword unknown idle_handle
keyword unknown enghandle

I gave var's for both
Code:
var enghandle; 
var idle_handle;
idle_handle = ent_playloop(my,idle_sound,20);
enghandle = ent_playloop(my,engsound,50);


sound idle_sound = <Engine_idle_d.wav>; // idlesound file
sound engsound = <Car_Engine.WAV>; // Engine sound file

function tune_esound()
{
while(1) // Repeat forever
{
if ( ( (joy_3) || (key_h) || (mouse_right) ) && (snd_playing(enghandle) == 0) )
{
snd_tune(enghandle,50,10,1);
}
else
{
if((joy_3 == 0) && (key_h == 0) && (mouse_right == 0))
{
snd_stop(enghandle);
snd_tune(idle_handle,20,0,1);
}
}
wait(1);
}
}



I got this example out the manual:
Code:
Example:
var whosh_handle;
whosh_handle = ent_playloop(my,whosh,100);
while (1)
{
ifndef SERVER; // no sound on server
snd_tune(whosh_handle,(10*total_ticks)%100,0,0);
endif;
wait(1);
}

See also:




Life is what you make it just like Games!
Re: snd_tune [Re: Techd] #162034
10/19/07 13:59
10/19/07 13:59
Joined: Jul 2007
Posts: 959
nl
F
flits Offline
User
flits  Offline
User
F

Joined: Jul 2007
Posts: 959
nl
i have a sti=upid question, maby thats the solutions
do you have the:

idle_handle = ent_playloop(my,idle_sound,20);
enghandle = ent_playloop(my,engsound,50);

inside a function

and if so can we see the func


"empty"
Re: snd_tune [Re: flits] #162035
10/19/07 17:10
10/19/07 17:10
Joined: Oct 2007
Posts: 42
Minnesota, USA
Techd Offline OP
Newbie
Techd  Offline OP
Newbie

Joined: Oct 2007
Posts: 42
Minnesota, USA
Quote:

i have a sti=upid question, maby thats the solutions
do you have the:

idle_handle = ent_playloop(my,idle_sound,20);
enghandle = ent_playloop(my,engsound,50);

inside a function

and if so can we see the func




It's not inside the function should it be, also function tune_esound() is the function.


Life is what you make it just like Games!
Re: snd_tune [Re: Techd] #162036
10/19/07 20:37
10/19/07 20:37
Joined: Oct 2007
Posts: 42
Minnesota, USA
Techd Offline OP
Newbie
Techd  Offline OP
Newbie

Joined: Oct 2007
Posts: 42
Minnesota, USA
Anyone?


Life is what you make it just like Games!
Re: snd_tune [Re: Techd] #162037
10/22/07 19:37
10/22/07 19:37
Joined: Jul 2007
Posts: 959
nl
F
flits Offline
User
flits  Offline
User
F

Joined: Jul 2007
Posts: 959
nl
mhhh just a sugestion

var enghandle;
var idle_handle;

sound idle_sound = <Engine_idle_d.wav>; // idlesound file
sound engsound = <Car_Engine.WAV>; // Engine sound file

idle_handle = ent_playloop(my,idle_sound,20);
enghandle = ent_playloop(my,engsound,50);

first store the sound, then play it


"empty"

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