Thread: NPC collision
View Single Post
  #6  
Old 08-26-2011, 05:00 AM
Tricxta Tricxta is offline
The Muffin Man
Tricxta's Avatar
Join Date: Oct 2010
Location: Australia
Posts: 563
Tricxta is just really niceTricxta is just really nice
Quote:
Originally Posted by DustyPorViva View Post
Not only is it not elegant but running triggeraction loops is horribly inefficient and taxing on the server.

NPCs, if given a shape(via setshape() or showcharacter()) are considered walls via onwall(). Instead, he could check for walls and only when they collide with a wall, check for an NPC in front of them... if you want to do something simple. However, this requires NPCs to block which may not be desired, and will end up emulating almost exactly what Thor is doing anyways... he could fall back on triggeraction when it hits a wall but I don't like to recommend triggeraction.
Good point... I had in mind it only being used a cheats way to make things work with the average npc character though, but yes... I was wrong to suggest such a horrid solution
Reply With Quote