Help with your scripting

Doc parameters

Doc parameters

Postby SpiderMack » 27 Sep 2017, 10:27

Hi

There is errors about parameters description for "lookatObject".

Code: Select all
void entity::lookatObject    (    int     entityID,
      int     targetID,
      float     rotProgress,
      int     axisX,
      int     axisY,
      int     axisZ
   )       


Simple Function to make one entity lookat another entity.

Parameters
entityID_1 : The Entity to set the Orientation to.
entityID_2 : The Entity to set the Orientation to.
rotProgress : The Entity to set the Orientation to.

AxisX : Set the Orientation of the object to work on the X Axis.
AxisY : Set the Orientation of the object to work on the Y Axis.
AxisZ : Set the Orientation of the object to work on the Z Axis.
User avatar
SpiderMack
Skyline Expert
 
Posts: 441
Joined: 02 Dec 2016, 09:15
Skill: Concept artist
Skill: 3D Modeller
Skill: Level Designer
Skill: Scripter

Re: Doc parameters

Postby SolarPortal » 28 Sep 2017, 10:40

yes, will change them now. (Updated API file ready for next API upload to server :) )

For this function to work, an entity cannot have physics as it rotates the entity.

Here is a quick script to show the usage of it:
Code: Select all
obj = 0;
targetID = 0;
rotProgress = 0;
rotFactor = 0.01;

-- System initialisation - Skyline script entry point
function onInit(objID)
   sky.lprint("LUA: Script Active!");
   obj = objID;
end

-- Called after all the scenes onInit() have been called.If you need to ensure your data exits, then do you set up here
function postInit()
   targetID = entity.getIDFromTag("target");
end

function onUpdate()
    rotProgress = rotProgress + rotFactor;
    if(rotProgress >= 1)then
        rotProgress = 0;
    else
        entity.lookatObject(obj, targetID, rotProgress, 0, 0, 1);
   end
end
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Doc parameters

Postby SpiderMack » 29 Sep 2017, 10:31

In Lua docs , functions Move and MoveUP for Character class have the same description and the same code.
User avatar
SpiderMack
Skyline Expert
 
Posts: 441
Joined: 02 Dec 2016, 09:15
Skill: Concept artist
Skill: 3D Modeller
Skill: Level Designer
Skill: Scripter

Re: Doc parameters

Postby SolarPortal » 29 Sep 2017, 10:41

We will be going through the API before v1.0 release to ensure that it is accurate. :)
Thanks for pointing this one out :)
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Doc parameters

Postby SpiderMack » 29 Sep 2017, 10:49

Same for entity class, inverseTransform , code is wrong.
User avatar
SpiderMack
Skyline Expert
 
Posts: 441
Joined: 02 Dec 2016, 09:15
Skill: Concept artist
Skill: 3D Modeller
Skill: Level Designer
Skill: Scripter

Re: Doc parameters

Postby SolarPortal » 29 Sep 2017, 10:51

Thanks :)
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Doc parameters

Postby SpiderMack » 29 Sep 2017, 11:27

Class Entity , lookatObject function get object parameters description error.
User avatar
SpiderMack
Skyline Expert
 
Posts: 441
Joined: 02 Dec 2016, 09:15
Skill: Concept artist
Skill: 3D Modeller
Skill: Level Designer
Skill: Scripter


Return to Lua Scripting

Who is online

Users browsing this forum: Google [Bot] and 4 guests