ID:160995
![]() Jul 1 2008, 8:31 am
|
|
I know how to make multi-tiled mobs but i can only do it with overlays so only one piece of the mob is dense how can i make it so the whole mob is dense.
|
![]() Jul 1 2008, 10:24 am
|
|
You could make several mobs that are dense and Move() with the player.
|
Shadow Darke has a big atom library you can use. I think he also made a dream makers article a while back on it, too.
|
Overlays become stored in an internal format, so adding a dense object doesn't retain it's density, since it's just an image.
|
Naokohiro wrote:
You could make several mobs that are dense and Move() with the player. sounds good but how would i keep the parts in the right place (some of the mobs have up to 7 parts) |
Here's what I came up with:
Basically, it's making some objects that are moved to follow the player every time the player moves, and they are dense so other mobs or objs will bump into them. <dm> |
two things
1)thank you Popisfizzy 2)umm how do i delete all the stored icon parts when the monster is destroyed? |
There are multiple misconceptions and mistakes (not meaning actual errors) there. You should probably experiment and test your code first after coming up with it.
|
You would need to delete all of the objects in the list, probably on mob/Del().
mob/Del() |
Popisfizzy wrote:
> mob/Move(loc) Wouldn't this work better in this case?: mob/Move(L,D) |
The dir argument isn't always set. In retrospect, this would be a slightly better way to do it:
mob/Move(loc, dir) There was also a slight error on the last line, which I've fixed. |
Popisfizzy wrote:
In retrospect, this would be a slightly better way to do it: Not quite. In fact, your initial implementation was better because even when the dir argument is supplied, in actuality, it isn't necessarily the direction of movement (as it can be specified manually in a call to alter dir). Additionally, you should probably not take into account the direction related functionality in the case of a movement long-range; if someone is to be teleported a long distance, it probably should not be blocked if it happens to be in an X direction. |