KingMassen
Quote: "Doesn't work And I did exactly what you said"
I added a simple all stock test map below. I made a longer room with player at one
end and Terminal-D at other end. Walk toward Terminal and each door you go thru
volume gets louder. Just download the test map, place in your "mapbank" folder
and open in fpsc.
Quote: " but still the sound plays as if it is background music"
Well, the music command I used is for "background music".
Like I said, look in the Syntax list and all commands are explained.
Music commands are for background music, "sound" commands are for sounds coming
from an "entity", and "plrsound" are from the player.
Your script says basically "have the entity play this sound - $0"
That's simple enough, but there's no volume to changing with player distance.
You can do that same for "sound" commands as for "music" only
sound uses "soundscale" for volume instead of "volume" like "musicvolume" does.
:state=0:state=1
:state=1,plrdistwithin=449:loopsound=$0,soundscale=20,state=2
:state=2,plrdistfurther=500:stopsound=0,state=0
:state=2,plrdistwithin=399:soundscale=30
:state=2,plrdistwithin=349:soundscale=40
:state=2,plrdistwithin=299:soundscale=50
:state=2,plrdistwithin=249:soundscale=60
:state=2,plrdistwithin=199:soundscalee=70
:state=2,plrdistwithin=149:soundscale=80
:state=2,plrdistwithin=99:soundscale=90
Noticed I used a sound loop command, sounds only play once
unless looped.
I really don't know why 3DSOUND is in the manual but not in Syntax list.
Quote: "t is actually Dynamic and works pretty well when it is Dynamic "
So it is Dynamic.
Quote: " Now I want this crater to become static "
Yes, you can do that.
Quote: "Obviously, the entity disappears because of using the 'sound' instruction with it"
No, you CAN'T do that. Static entities can not run scripts. They are just static. ONLY dynamic entities
can run scripts.
Quote: "what if I want an entity to be fixed....Should I disable the physics?"
No, remember what I said before. Keep it dynamic, right click open property setting, go down until
you see "Is Immobile" set to "YES" now it wont move and can still run scripts
Also: here is a super tool for you to use if your doing a lot of scripts changes.
You should always clean out the ".bin & .dbo" files between script changes or
else changes wont take effect. Just drop the .exe in your main directory and
run once between tests. Makes life a lot easier.
http://forumfiles.thegamecreators.com/thread/196309My games never have bugs. They just develop random features..
Lots and lots of random features...