[Lua] Question menu

User Tag List

Results 1 to 7 of 7
  1. #1
    syrtan's Avatar Member
    Reputation
    11
    Join Date
    May 2007
    Posts
    93
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Lua] Question

    I was wondering how I could change the way that the mob are facing. For example now i scripted the mob to spawn a gameobject and move himself to new coords. But when he comes to the coords he is facing away from the ovject. And I want him to look at the object.

    [Lua] Question
  2. #2
    Ground Zero's Avatar ★ Elder ★
    Reputation
    1132
    Join Date
    Aug 2008
    Posts
    3,503
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Easiest way would be to add a new function shortly after the mobs finished moving to turn in the direction you want it to move slightly like by 0.1 and it should face that way.

  3. #3
    syrtan's Avatar Member
    Reputation
    11
    Join Date
    May 2007
    Posts
    93
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmm tried the :SetFacing() and move the creature with a different orientation value. Still dosent work.

  4. #4
    RyeRye's Avatar Contributor
    Reputation
    240
    Join Date
    Aug 2008
    Posts
    996
    Thanks G/R
    0/1
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, maybe the way you have him spawned at first? It could effect how he faces the object you want him to look at.



  5. #5
    syrtan's Avatar Member
    Reputation
    11
    Join Date
    May 2007
    Posts
    93
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When I spawn him, he is facing north. Then he walk away from the object but looking south. And I just want him to face north and look at the object.

  6. #6
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    WoW works in Radians, you can use this to calculate which way the NPC is facing in relation to the gameobject and then turn to face it. If you can't find an orientation command that works, then I suggest moving towards the object again after reaching a point but only slightly, so that it is looking in the right direction.

  7. #7
    iotech's Avatar Active Member
    Reputation
    28
    Join Date
    May 2008
    Posts
    113
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Stoneharry is correct as usual;

    Radians = Degrees * 0.0174532925

Similar Threads

  1. [LUA] Question
    By Algorithm in forum World of Warcraft Emulator Servers
    Replies: 9
    Last Post: 04-14-2008, 02:50 PM
  2. [LUA Question] Is it possible..?
    By Greeko in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 04-14-2008, 02:49 PM
  3. LUA Question (advanced?)
    By CairiFEA in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 04-13-2008, 01:57 AM
  4. LUA Question
    By CairiFEA in forum World of Warcraft Emulator Servers
    Replies: 8
    Last Post: 04-10-2008, 08:10 PM
  5. script lua question
    By onilank in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 12-21-2007, 06:58 PM
All times are GMT -5. The time now is 02:11 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search