How would you permanently disable a certain mobs movement?
Example being, a player being a immobile object like a base in an RTS?
Not that i'm making an RTS i just want to understand how that would be done :)
ID:155572
May 21 2011, 8:08 pm
|
|
May 21 2011, 10:13 pm
|
|
To disable the arrow keys
|
In response to Warlord Fred
|
|
these procs are built in for client but if you want to do that for npc then instead of client use
mob/npc |
In response to Hassanjalil
|
|
No, if you don't want an NPC to move you don't move it. NPCs don't move unless your code tells them to.
|
In response to Prf X
|
|
Overriding the arrow keys isn't particularly robust. You'd end up with 8 versions of the same code if you want the arrow keys to behave differently under the same situations, and not to mention these are client procs and not mob procs, so they don't apply to NPCs.
Instead, try overriding Move() if you're trying to stop or limit movement. Here's an example of what I mean. mob When mob.frozen = 1, the mob will not move. Because of inheritance, all NPCs that are a subclass of /mob will also inherit the frozen attribute and behavior. Making a building or other immobile object in an RTS merely requires that Move() not be called or that Move() fails. |
In response to Warlord Fred
|
|
i am referring to the player...
|
In response to D4RK3 54B3R
|
|
Ok since no one seriously understands what i meant, except maybe that last guy let me rephrase.
Disable player movement, making the arrow keys only for moving the client.eye not the player. |
In response to Komuroto
|
|
still waiting...
|
In response to Komuroto
|
|
This is what I came up with hoping this is what you are looking for...
client I do believe this is what you are asking for...only reason I put the "if" statements in was when eye hit the edge of the map the whole screen would go black, but with my testing it just moves the eye and your player stays in place. |