Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (TedMar, AndrewAMD, dr_panther, 1 invisible), 1,186 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
on sound playing #386628
11/06/11 19:08
11/06/11 19:08
Joined: Feb 2006
Posts: 124
Dallas,TX
Delirium Offline OP
Member
Delirium  Offline OP
Member

Joined: Feb 2006
Posts: 124
Dallas,TX
This is really embarrassing....I know, I know, read the manual. I have been. I don't want to bother an expert, perhaps another newbie to lite-c who has gotten this to work can help.

I'm making an action where when you impact an object, it makes a sound. Once. The impact part is correct. the function the impact calls just needs to play a sound. before the level will run it tells me undeclared variable, so i tried declaring it first half a dozen ways, sound ="noise.wav"; Ent noise="noise.wav", or <noise.wav> etc sometimes with asteriks like it shows. I tried it using media handle. I did read the manual and studied it's multitudinous sound commands, for loops, for checking if it's playing etc.
What is the right and simplist way to play a sound from a function? I have been trying, but after an hour of trying it different ways.. how do you do it in lite_C? Please. Some beginner tell me quick before a senior expert sees I've asked another embarrassing question. I really think they should add another catefory in the forum, lite-c for dummies.


Learning to write lite-C -- A8 commercial
Re: on sound playing [Re: Delirium] #386630
11/06/11 19:27
11/06/11 19:27
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Here is a good example:
http://www.conitec.net/beta/asnd_create.htm
Hope, it helps.

Maybe, you are not aware of that Lite-C is case sensitive - in contrast to wdl? Means, you have to write 'SOUND*'. It is completely in capitals.
'Sound' or 'sound' are wrong.

Re: on sound playing [Re: Pappenheimer] #386631
11/06/11 19:40
11/06/11 19:40
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
You can use Pappenheimer's snd_create and/ or stay with global sounds:

SOUND* snd_event = "event.wav";

void object_event()
{
snd_play(snd_event,100,0);
}

action object()
{
my.emask |= ENABLE_IMPACT;
my.event = object_event; // <- EDIT forgot this line
}

Last edited by Superku; 11/06/11 19:48.

"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
case sensitive [Re: Pappenheimer] #386633
11/06/11 19:44
11/06/11 19:44
Joined: Feb 2006
Posts: 124
Dallas,TX
Delirium Offline OP
Member
Delirium  Offline OP
Member

Joined: Feb 2006
Posts: 124
Dallas,TX
case sensitive? That could explain a lot of my problem with lite-C. Somewhere in C I had hearn case doesn't matter. Okay and thanks, I know something else to watch. And the example you sent to read...


Learning to write lite-C -- A8 commercial
Re: case sensitive [Re: Delirium] #386634
11/06/11 19:54
11/06/11 19:54
Joined: Feb 2006
Posts: 124
Dallas,TX
Delirium Offline OP
Member
Delirium  Offline OP
Member

Joined: Feb 2006
Posts: 124
Dallas,TX
Oh, I just saw SuperKu's response. Thank you as well for helping. With my lame questions it must sound like I'm not getting anywhere, but in about twenty four hours and using the manuals and the forum I've gotten to the point where I can create a level, get a player moving around with the keys I want, with a great shadow, sky, and am getting into making interactions do things. I appreciate your help. I'll try to read first and ask only as a last resort.


Learning to write lite-C -- A8 commercial
Re: case sensitive [Re: Delirium] #386635
11/06/11 20:09
11/06/11 20:09
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Your questions are welcome.
Hope, you don't mind that we mention the manual from time to time. wink
This might help you as well to get more familiar with Lite-C:
http://www.conitec.net/beta/litec_migration.htm

Re: case sensitive [Re: Pappenheimer] #386644
11/07/11 01:08
11/07/11 01:08
Joined: Dec 2008
Posts: 1,660
North America
Redeemer Offline
Serious User
Redeemer  Offline
Serious User

Joined: Dec 2008
Posts: 1,660
North America
No one minds your questions, don't be embarrassed. laugh


Eats commas for breakfast.

Play Barony: Cursed Edition!

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