Ok for my game im making a movie. It puts the NPC's on the screen so it can have a little movie. How do I make the NPC move? here is what i got
mob/proc
movie1()
textonscreenbackground(1,1,13,5)
textonscreenTEXT(1.5,12,5,1.5,"King:Hm...this isnt good..a curse? How can this be!?")
sleep(10)
usr.close_menu()
for(var/mob/Movie/Guard1/P in client.screen)
P.go()
mob/Movie/Guard1
icon = 'People.dmi'
icon_state = "DW1"
screen_loc = "1,1"
proc/go()
sleep(1)
step(src,NORTH)
sleep(1)
step(src,NORTH)
sleep(1)
step(src,EAST)
sleep(1)
step(src,EAST)
sleep(1)
step(src,EAST)
ID:262002
May 19 2004, 11:34 am
|
|
In response to Goku72
|
|
k
|
In response to YMIHere
|
|
There is a typo in there, in Lummox's version of Bump which is actually the correct one he puts a comment in saying that it is wrong. There were a couple other insignificant mistakes, but that one could confuse people trying to learn from the article.
|
In response to Loduwijk
|
|
I never noticed that, but if someone has basic reading comprehension skills they'll notice it's a typo, as you did. =)
|
In response to Goku72
|
|
Goku72 Wrote>>That'd only work if the guard was on the map, not the screen. To make them move when they're on the screen, you'll have to change their screen_loc.
Yes, and even that would cause some very block movement... |
In response to SquallX7
|
|
Well, he asked a simple question, so I gave him a simple answer. =P
If you wanted to make it look as if the mob was really on the screen, it'd be a little bit more processor intensive and probably not best for multiplayer, since you'd have to toy around with offsets, and even then, it'd look funky. |
In response to Loduwijk
|
|
No, no, no. Lummox is correct; usr should NOT be used in Bump(). Bump() is a movement proc, and usr should not be used in movement procs (for reasons he spells out in the article).
|
In response to Crispy
|
|
He's only saying their is a typo in it. He still has the comment "// this code is wrong" in the fixed Bump() proc. :)
|
In response to YMIHere
|
|
Hah, whoops. Sorry about that. That'll teach me to skim through the material I'm talking about.* My bad!
* Actually, it probably won't. But it should. =P |
That'd only work if the guard was on the map, not the screen. To make them move when they're on the screen, you'll have to change their screen_loc.