mob
icon = '.dmi'
icon_state = "1"
New()
..()
move_AddFOBJ(icon('.dmi',,icon_state="2"),"2",1,0)
move_AddFOBJ(icon('.dmi',,icon_state="3"),"3",0,-1)
move_AddFOBJ(icon('.dmi',,icon_state="4"),"4",1,-1)
Problem description:Ok So i used this to make a multi tile mob but i want it to be a NPC So i need it to walk around follow people and atk people how would i do thiss with a "Multi Tile Mob"? Also How do i make all 4 parts of the body hard?
ID:144237
Feb 13 2007, 8:03 pm (Edited on Feb 13 2007, 8:43 pm)
|
|
How to do it depends on the multi-tile movement system/method you use. The normal movements procs (Move(), walk()...) may be enough.
|
Well, there is a problem in that unless move_AddFOBJ is adding actual objects, then it's not the right system for you. I'm not sure what you're using to add the other parts.
To make all four parts move, you need to override Move() and move each one individually. (The tricky part is, you need to figure out what order to move them in based on your direction.) You'll also need to override Bump() so that if one of the sub-parts calls Bump(), it gets rerouted to the "head". If you use a system that also includes Bumped(), then Bumped() will also need to reroute any events to the head object. Lummox JR |
In response to Atomixkid
|
|
Atom first off thx very much one prob tho when i add it to my NPC So it can walk around It Says Missing preceding If Statement which there is not one but when i dotn put it in my NPC so ti can walk it says its fine?
Note: I changed and used a 2 tile mob to test it. |
In response to Shadowkaroth
|
|
bumb
|
In response to Shadowkaroth
|
|
Don't just copy and paste code somewhere without adjusting it and expecting it to work.
Also, to help you with an error, we obviously need to view the code... |
In response to Kaioken
|
|
i didnt copy and pasted i tested it ovisly am a coder i changed many things but i needed to test it in its first format follow the link that he gav me to the hard multi tile mobs.
|
In response to Shadowkaroth
|
|
Shadowkaroth wrote:
Atom first off thx very much one prob tho when i add it to my NPC So it can walk around It Says Missing preceding If Statement which there is not one but when i dotn put it in my NPC so ti can walk it says its fine? I don't know which if it's talking about or anything. Mybe if you showed me the error or line of code it says is wrong then I may be able to help. |
In response to Atomixkid
|
|
I fixed it just now and got it to be 4 tiles am fixing it and making all parts know there owner.
|
About the NPC thing I'm sure you can find libraries on them somewhere. You might have a bit of trouble making it compatible with the multi-tiled mob.