Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Idiots who reply

Author
Message
Pixle Pusher
20
Years of Service
User Offline
Joined: 4th May 2004
Location: Monitor, Keyboard, Mouse. UK
Posted: 7th May 2004 19:57 Edited at: 7th May 2004 20:01
What's the point in replying to posts only to say "I suggest you look up the Sound commands in the dbp help. It explains how to use the various commands" No S***! See, How to make different sounds play at certain points.
Don't people think Newcomers don't read the Reference Manual, or use the DBP Help?
This is Newcomers Corner, for people who are new to programming e.t.c
Izzy545
20
Years of Service
User Offline
Joined: 18th Feb 2004
Location:
Posted: 7th May 2004 20:03
Umm, I think that is a very valid reply. To make them play at certain points you use the commands in the help. In fact, if you had read them, you would know that whenever you want to play a sound you use

Play Sound Sound Number

That should tell you right there.
Richard Davey
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 7th May 2004 20:04
If you're not getting the kind of reply you need - you're asking the wrong question or phrasing it incorrectly.

With our species on the edge of extermination,
with no prospect but a horrible death,
we actually played games.
Pixle Pusher
20
Years of Service
User Offline
Joined: 4th May 2004
Location: Monitor, Keyboard, Mouse. UK
Posted: 7th May 2004 20:18
Izzy545

The manual doesn't explain how to play a sound at a certain point, like when you hit a wall, at least not to a beginner.
Izzy545
20
Years of Service
User Offline
Joined: 18th Feb 2004
Location:
Posted: 7th May 2004 20:27
That's because they didn't gear the manual towards specific events.

You need to learn to mix and use the commands, thats what I'm *still* learning to do. Once you can do that well enough then you can do most anything. Here's the commands you can find in the users manual that you could use in that situation.

Global collision on (turns collision on for all objects regardless of their current collision status)

object collision(object number 1, object number 2) (returns a 1 if there is a collision between the two objects)

and then, of course, Play sound Sound Number.

Pretty simple...
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 7th May 2004 20:28 Edited at: 7th May 2004 20:30
Guess what? It doesn't explain it to a intermediate or professional programmer, either. You have to apply a few brain cells. If I hit the wall then play that sound. In this example, the real question is a collision question. Not trivial, but not impossible either. Replying to questions is a volunteer thing and tends to be hit and miss since you're not even sure if the person is asking the right question.
--
TAZ

[It looks likes Izzy545's reply is along the same line, but more helpful.]

All replies come with a money back guarantee. (Less shipping and handling charges, connection fees, and nusance tax.)

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 7th May 2004 20:30
The manual doesn't tell you how to sort an array, or get a model to walk up a set of stairs, or half a million other things ... that's because it's a programming language, not a point-n-click game creator.

I've read CR's reply to you and thought that it explained what you need to do quite well. The fact that you didn't understand or take the time to put the clues he gave you together doesn't give you the right to call someone who tried to help you and idiot. If you had stayed polite, he might have actually written a short piece of code for you, but you've probably scuppered that now.

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins, source and the Interface library for Visual C++ 6, .NET and now for Dev-C++ http://www.matrix1.demon.co.uk
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 7th May 2004 20:38
Quote: "I've read CR's reply to you and thought that it explained what you need to do quite well. The fact that you didn't understand or take the time to put the clues he gave you together doesn't give you the right to call someone who tried to help you and idiot. If you had stayed polite, he might have actually written a short piece of code for you, but you've probably scuppered that now."


Thank you IanM.

Pixel Pusher: so far you've called me a Twat and now an Idiot. I don't know if you have edited your original post or not - whatever - I stated the commands that would help you like Load Sound, Play Sound, object collision() -- probably some of the EASIEST commands in dbp. I didn't immediately say "oh, look at the help" But Since I didn't write your code for you you get all up in a childish huff.

Maybe I am an idiot and a twat, but guess what, my games have collision and the even play sounds too - so buzz off.


* DBP_NETLIB_v1 - VB.NET PLUGIN FOR DBP * Click Logo
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 7th May 2004 20:40
Also: I would appreciate this, and the other threads locked or deleted, thanks.


* DBP_NETLIB_v1 - VB.NET PLUGIN FOR DBP * Click Logo
Pixle Pusher
20
Years of Service
User Offline
Joined: 4th May 2004
Location: Monitor, Keyboard, Mouse. UK
Posted: 7th May 2004 20:50
I edited the post as you wished. But why answer a post only to say look it up in the manual, or whatever it was?
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 7th May 2004 20:58
I mentioned the commands you should be using by name and pointed out some intracices of them. I only directed you to the manual when it became clear that you didn't want to help yourself, you wanted someone else to write your code. Had you posted code examples of what you wrote that wasn't working I would have GLADLY helped you rewrite the code. But you chose to resort to insults so thats that with that.

In the least you owe me an apology which then does not garuntee I will help you now or in the future, but it may go a long way for you on these forums - where others have now experienced your character. It's still salvageable.


* DBP_NETLIB_v1 - VB.NET PLUGIN FOR DBP * Click Logo
Pixle Pusher
20
Years of Service
User Offline
Joined: 4th May 2004
Location: Monitor, Keyboard, Mouse. UK
Posted: 7th May 2004 21:09
I didn't want you to write code for me. An explanation fit for a beginner would have been o.k.
When people post saying look it up in the manual, it just get's annoying.
If i could have found what i was looking for in the manual i wouldn't have posted.

Sorry
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 7th May 2004 21:44
accepted.

Now, if you want some help with the sound problem, post some code and we can see what can be done.


* DBP_NETLIB_v1 - VB.NET PLUGIN FOR DBP * Click Logo
Pixle Pusher
20
Years of Service
User Offline
Joined: 4th May 2004
Location: Monitor, Keyboard, Mouse. UK
Posted: 7th May 2004 22:00
The code for the collision is not mine, it belongs to Kensupen and Lokidecat.
What i can't get to grips with is, when i reach the foot of the stairs i want the stairs slow.wav to play.
Thanks
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 7th May 2004 22:07 Edited at: 7th May 2004 22:17
In the _ramp subroutine there is this code fragment.

`if you are going up a ramp
if oldht#+grav#0.0
repx#=newxvalue(cx#,newa#,newd#)
repz#=newzvalue(cz#,newa#,newd#)
position camera repx#,cy#,repz#
endif

I'd wager that this is a good place to check if the sound is playing or if you need to start it.
--
TAZ

Of course, that's just the tip of the iceberg. If that wav file is walking up creeky stairs, you might want to add an 'isMoving' flag so you don't play the sound if you stop on the stairs.

Now, if what you're after is environmental music, you probably should go with a waypoint list/array and check for proximity to those waypoints and play or stop the music appropriately. [Ah, I see that CR is explaining that method as well. Good deal.]

CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 7th May 2004 22:13
well, in your main loop you could check the position of the player vs where the base of the stairs are located, and then if the player is within, or very close to, the spot then launch the sound. You may not need all 3 axis but...

px#=object position x(player)
py#=object position y(player)
pz#=object position z(player)
if px#=stairsx# and _
py#=stairsy# and _
pz#=stairsz#
play sound snum
endif

but most likely the player would never be exactly in the coords so you might need to make it a range like stairsx# -5 and +5 etc


* DBP_NETLIB_v1 - VB.NET PLUGIN FOR DBP * Click Logo
Pixle Pusher
20
Years of Service
User Offline
Joined: 4th May 2004
Location: Monitor, Keyboard, Mouse. UK
Posted: 7th May 2004 22:21
Thanks to both of you for your help.
I think i get it
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 7th May 2004 22:35
<----



* DBP_NETLIB_v1 - VB.NET PLUGIN FOR DBP * Click Logo
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 7th May 2004 22:44
actually a simpler way would be to have a hidden object by the stairs/ramp target area and use collision to know when the player gets there. Let's say you have a hidden object as # 1 and the player is #2...

if object collision(1,0)=2
play sound num
endif

that might be a little cleaner


* DBP_NETLIB_v1 - VB.NET PLUGIN FOR DBP * Click Logo

Login to post a reply

Server time is: 2024-09-22 08:41:53
Your offset time is: 2024-09-22 08:41:53