i got a bump code:
Bump(M)
if(get_dir(src, M) == SOUTH)
//other stuff here.
and it keeps giving my this error
Jet Jock.dm:45:error:Bump :undefined proc
do any of you know why?
ID:149789
Feb 18 2002, 8:59 am
|
|
Feb 18 2002, 9:00 am
|
|
Depends on how you're calling it show more code, please.
|
In response to Nadrew
|
|
k
turf wall icon = 'wall.dmi' density = 1 Bump(M) if(get_dir(src, M) == SOUTH) usr.life -= 5 usr.Dcheck() |
In response to Scoobert
|
|
The wall's Bump() is never called because the wall doesn't bump the mob the mob bumps it. So this is how you need to do it:
mob |
In response to Nadrew
|
|
oh ok i thought it worked like Entered and stuff kuz the mob enters the object not the other way around but you still but the enterd proc in the object.
|
In response to Scoobert
|
|
ok i did not get that to work, when i bump it does nothing here is how i have the code now
mob Bump(atom/A) if(istype(A,/turf/wall && src.dir == SOUTH)) world<<"[usr] needs to watch out for the walls" usr.life -= 5 usr.Dcheck() and bump does nothing at all in it. You know why? |
In response to Scoobert
|
|
Scoobert wrote:
ok i did not get that to work, when i bump it does nothing here is how i have the code now Try that. |
In response to Nadrew
|
|
whats the diffrence?
|
In response to Scoobert
|
|
I closed istype() before I tried to check the direction.
|
In response to Nadrew
|
|
well didnt make a diffrence still dosnt work. Could it be because im forcing the mob to move? its a jet game.
|
In response to Scoobert
|
|
Use src instead of usr, the code works fine for with (without usr used once of course).
|
In response to Nadrew
|
|
still not working, i invitwe you to come and see it now, ill start hosting it now its call Jet Jock. Can you join?
|
Scoobert wrote:
i got a bump code: It may be because you didn't define M. Try Bump(mob/M) |
In response to Super16
|
|
oh k ill try
|
In response to Scoobert
|
|
I tried you code, with a few changes here's what I have:
mob |
In response to Nadrew
|
|
humm, this is very odd to me but it seems that ofter the else statment it works fine kus it tells me the else thing when i run into walls sideways. But it justs dont work North, im going to do some more testing but tell me what you think.
[EDIT] ok i know why it is not working, its because using gravity im forcing the mob to move and when you say NORTH its saying that the mob is moving north on its own, so do you know how to fix that? |