From time to time we will inform the community of certain areas of Skyline Development. If we have decided to add a new features or new demos in development etc we will try to make a post in this topic.Feel free to leave your comments to help encourage out development team ; )

Skyline - Animation Events (Development Log)

Skyline - Animation Events (Development Log)

Postby SolarPortal » 17 Aug 2018, 14:12

It has been requested for a while and because of its importance, we have decided to add Animation Events to skyline which will allow you to get a function called when an animation hits a certain time or frame. This is currently in development, but we now have the editor adding events and changing their properties.

Clipboard Image.jpg
Clipboard Image.jpg (129.94 KiB) Viewed 109 times


More information to come.
Conceive, Quantify & Do!
Skyline Game Engine - Lead Developer.
Please provide as much information as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 3770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3059
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Skyline - Animation Events (Development Log)

Postby SolarPortal » 17 Aug 2018, 17:12

Removal of animation events via the mesh editor now works.
Conceive, Quantify & Do!
Skyline Game Engine - Lead Developer.
Please provide as much information as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 3770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3059
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Skyline - Animation Events (Development Log)

Postby SolarPortal » 17 Aug 2018, 21:19

Ok, animation events seem to be working in skyline now and even as the scene speed slows down or increases which makes the animation slow down, the event trigger to lua will always be in time with the animation.

Clipboard Image.jpg
Clipboard Image.jpg (202.83 KiB) Viewed 103 times


Here's the code for the new Event system:
Code: Select all
obj = -1;

-- 
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 exitsthen do you set up here
function postInit()
    
entity.registerAnimationEvents(obj1);
    
anim.stopAnimation(obj"walk");
    
anim.playAnimation(obj"run"301);
end

function event_doFootStep_Walkargument )
    
local string =  "No foot"
    
local foot tonumber(argument);
    if( 
foot == 0)then string "Left Foot"; elseif( foot == then  string "Right Foot"end
    lprint
(" Walk: Foot Step: ".. string);
end

function event_doFootStep_Runargument )
    
local string =  "No foot"
    
local foot tonumber(argument);
    if( 
foot == 0)then string "Left Foot"; elseif( foot == then  string "Right Foot"end
    lprint
(" Run: Foot Step: ".. string);
end


And heres the setup in the mesh editor:
Clipboard Image (1).jpg
Clipboard Image (1).jpg (136.78 KiB) Viewed 100 times
Conceive, Quantify & Do!
Skyline Game Engine - Lead Developer.
Please provide as much information as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 3770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3059
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer


Return to Skyline Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron