ID:179636
 
I want to make it so when you run into a mountain it makes a noise
this is what i have
Moutains
icon = 'Moutains.dmi'
density = 1
Bump(turf/Mountains)
usr<<sound('Bump.wav')
i am not sure how i could define it
Greg wrote:
I want to make it so when you run into a mountain it makes a noise
this is what i have
Moutains
icon = 'Moutains.dmi'
density = 1
Bump(turf/Mountains)
usr<<sound('Bump.wav')
i am not sure how i could define it

no a mountain does not bump something a mob bumps a mountain is what you want here:

mob
bump(turf/mountain/M as turf)
if(isturf(M))
usr<<sound('Bump.wav')
In response to Air _King
ok i used that but i get one error
Turf.dm:37:error:M:undefined type: M

This is what i put
mob
Moutains
icon ='Moutains.dmi'
Bump(turf/moutain/M as turf)
if(isturf(M))
usr<<sound('Bump.wav')
and it said that i had that error
In response to Greg
Pah...
turf/mountain
Bump(mob/M)
M << sound('bump.wav')
In response to Vortezz
Vortezz wrote:
Pah...
> turf/mountain
> Bump(mob/M)
> M << sound('bump.wav')
>


wouldn't that mean the mountain has to bump the usr???
In response to Air _King
that gives me an error of undefined bump proc
In response to Air _King
Air _King wrote:
wouldn't that mean the mountain has to bump the usr???

If I throw a rock at your head, are you bumping into it? Is it bumping into you? Yes.
In response to Greg
Are you sure you used Bump and not bump?
In response to Vortezz
Vortezz wrote:
Air _King wrote:
wouldn't that mean the mountain has to bump the usr???

If I throw a rock at your head, are you bumping into it? Is it bumping into you? Yes.

no you bump into mountain(walk into it) it does not walk into you.
In response to Air _King
Air _King wrote:
no you bump into mountain(walk into it) it does not walk into you.

The definition of bump, in this case, is "when two dense objects touch each other," not "when you walk into something".
In response to Air _King
Please Air _King stop using reply with quote unless you have more than one line to say.
In response to Nadrew
yes i am sure i used Bump() and not bump()
In response to Nadrew
1) to Nadrew ok it wont let me delete them though i dont have the option.

2) Greg try:
mob
Bump(/turf/mountain/T)
var/mountain/floor/T
if(isturf(T))
usr<<"whatever"
In response to Air _King
Air _King wrote:
Bump(/turf/mountain/T)
var/mountain/floor/T

That'll produce a duplicate definition. Get rid of the bold line and it should work.
In response to Vortezz
Vortezz wrote:
Air _King wrote:
wouldn't that mean the mountain has to bump the usr???

If I throw a rock at your head, are you bumping into it? Is it bumping into you? Yes.

also it is for a movable atom HA also
its definition is:
Called when a movement fails due to a dense blockage.
ALSO it doesnt work when you put it for a turf i get Bump :undefined proc, but when i do it for a mob nothing no errors.
In response to Air _King
Air _King wrote:
its definition is:
Called when a movement fails due to a dense blockage.
ALSO it doesnt work when you put it for a turf i get Bump :undefined proc, but when i do it for a mob nothing no errors.

Eh, you're right. I must be thinking of Enter()
In response to Vortezz
Vortezz wrote:
Air _King wrote:
its definition is:
Called when a movement fails due to a dense blockage.
ALSO it doesnt work when you put it for a turf i get Bump :undefined proc, but when i do it for a mob nothing no errors.

Eh, you're right. I must be thinking of Enter()

YAY sorry Nadrew just had to.
In response to Vortezz
Well now it says bad var wich is the t so i have no idea why it wont work
In response to Greg
Greg wrote:
Well now it says bad var wich is the t so i have no idea why it wont work

works fine for me check it agian.
In response to Air _King
I've got a similar question since I'm working on the Bump, bump, Block part of my game engine at the moment. I got everything working ok. Except I get some null errors returned from the MOB. Right now its nothing more than a simple usr << "You do this." text statement to show the code is working. When I attack for example a MOB, it says you attack the so&so mob. But my code for the MOB do that happen. I've got a question, I'm at work now so can't post my actual code.

Where does the MOB's reaction code go?
In the Block() proc?
Under the mob/npc/Bump()?
Under the mob/pc/Bump() code?

LJR
Page: 1 2