Gamestudio Links
Zorro Links
Newest Posts
Lapsa's very own thread
by Lapsa. 06/26/24 12:45
Executing Trades on Next Bar Open
by Zheka. 06/20/24 14:26
A simple game ...
by VoroneTZ. 06/18/24 10:50
Face player all the time ...
by bbn1982. 06/18/24 10:25
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Lapsa), 1,331 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Mino, squik, AemStones, LucasJoshua, Baklazhan
19061 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
Re: sound code [Re: Sunangel] #75483
05/28/06 11:31
05/28/06 11:31
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Are you guys using the A6 templates?

Re: sound code [Re: Sunangel] #75484
05/28/06 18:05
05/28/06 18:05
Joined: Mar 2006
Posts: 21
A
aslam Offline
Newbie
aslam  Offline
Newbie
A

Joined: Mar 2006
Posts: 21
Thanks for reply, but is there anybody who can help us...??

Re: sound code [Re: aslam] #75485
05/28/06 18:14
05/28/06 18:14
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
I'm gonna go give it a try again...

It worked fine for me...?


xXxGuitar511
- Programmer
Re: sound code [Re: xXxGuitar511] #75486
05/28/06 18:24
05/28/06 18:24
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
The second code that I posted worked perfectly for me...

It plays a sound (ONCE) when the player model gets close enough to the entity with the action assigned...

If you need to, change the variable player.x, to camera.x.

If your still having problems, then learn c-script via the manual...


xXxGuitar511
- Programmer
Re: sound code [Re: xXxGuitar511] #75487
05/28/06 19:33
05/28/06 19:33
Joined: Mar 2006
Posts: 21
A
aslam Offline
Newbie
aslam  Offline
Newbie
A

Joined: Mar 2006
Posts: 21
Thanks for the help but I have tried via the manual...even I have used camera.x but it is giving the voice as the game is going to start....any other suggestion will be appreciated.

Re: sound code [Re: aslam] #75488
05/28/06 19:35
05/28/06 19:35
Joined: Mar 2006
Posts: 21
A
aslam Offline
Newbie
aslam  Offline
Newbie
A

Joined: Mar 2006
Posts: 21
Yes I am using A6 templates...

Re: sound code [Re: aslam] #75489
05/28/06 20:30
05/28/06 20:30
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
Code:

sound SkelVoiceSND = <Voices.wav>; // The sound...
var SkelVoiceVol = 200; // The volume...

ACTION SkelVoice
{
my.skill1 = 200; // Distance player has to be within to play the sound
while(player == null) {wait(1);}
while(my.skill1 > 0)
{
if (vec_dist(my.x, player.x) <= my.skill1)
{
ent_playsound(my, SkelVoiceSND, SkelVoiceVol);
my.skill1 = 0;
}
wait(1);
}
}



Last edited by xXxGuitar511; 05/29/06 16:35.

xXxGuitar511
- Programmer
Re: sound code [Re: aslam] #75490
05/28/06 20:33
05/28/06 20:33
Joined: Mar 2006
Posts: 21
A
aslam Offline
Newbie
aslam  Offline
Newbie
A

Joined: Mar 2006
Posts: 21
ok I understand something, it is working with A5 templates....I can hear the sound , when the player is reaching very very near, which I have fixed but after once when player is coming back again, it is not giving the same voice again. any tip from anybody... secondly I want to put different commentary for different objects, how I shall do that?? same script will work for every object for different wave files??

Re: sound code [Re: aslam] #75491
05/29/06 10:43
05/29/06 10:43
Joined: Mar 2006
Posts: 21
A
aslam Offline
Newbie
aslam  Offline
Newbie
A

Joined: Mar 2006
Posts: 21
First of all thanks xXxGuitar511, my one file is working with your script. Just want to ask you that why it is not working with A6 templates, any suggestions about it??

Re: sound code [Re: aslam] #75492
05/29/06 16:37
05/29/06 16:37
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
I updated the code, see if it works now...
(Changes in red)

The problem is that the player and the skeleton are starting out within the range set. Try the changes above, and if it doesn't work... then I don't know...


xXxGuitar511
- Programmer
Page 2 of 3 1 2 3

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