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
3 registered members (NewbieZorro, TipmyPip, AndrewAMD), 14,749 guests, and 7 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
How to make a perfect effect with sound?? #179927
01/25/08 15:52
01/25/08 15:52
Joined: Nov 2007
Posts: 37
L
LavenderSs Offline OP
Newbie
LavenderSs  Offline OP
Newbie
L

Joined: Nov 2007
Posts: 37
Hi guys,
I've met problems in my way of writing codes with lite-C .btw, I am a rookie in lite-C.
1. How to make an entity like guard walk with a step sound, that is, every step are followed by a 'tata' sound. I have made it this way, but the effect after compiling is really unsatisfactory:

action walking()
{
guard = my;
while (1)
{
...
if (key_w)
{
c_move (my, vector(3*time_step, 0, 0), nullvector, GLIDE);
ent_animate(my,"walk",walk_percentage, ANM_CYCLE);
walk_percentage += 5 * time_step;
play_sound(); //Play a step sound
}
...
}
}
2. I want to play a sound in a function, but I was so puzzled that the function "media_play" can work but "snd_play" can't play any sound. For instance,here is what I wrote:
function play_sound()
{
media_play(step_sound, NULL, 80); //OK!
// snd_play(step_sound, 80, 0); //Can't work anyway, the parameters passed to it are no problem.
}
3. What are the differences between toggle() and set() while setting the flag of a object?
4. Where cound I download the codes and files such as .WMP and .C that are referred to in the content of AUM? (There are some quite good code examples in the colume of 'workshop', but they are splitted in the articles:( )

Thanks a lot for your patience of reading so many problems and helping me!
Best regards!

Re: How to make a perfect effect with sound?? [Re: LavenderSs] #179928
01/27/08 13:36
01/27/08 13:36
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
1: You better take "ent_playsound(my,yoursound,volume);".
You have to call this every second.

2: ???

3: with set is the flag "on", with toggle you switch the flag
(on --> off / off --> on).

4: Open the AUM, on the left side you have "Resources, Downloads"

Re: How to make a perfect effect with sound?? [Re: Widi] #179929
01/28/08 02:20
01/28/08 02:20
Joined: Nov 2007
Posts: 37
L
LavenderSs Offline OP
Newbie
LavenderSs  Offline OP
Newbie
L

Joined: Nov 2007
Posts: 37
Thanks,Widi!


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

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