Help with your scripting

Player Movement

Player Movement

Postby epsilonion » 17 Oct 2015, 13:59

Hi,
I was going to make my player climb ladders using trigger boxed and a Boolean condition (ladder), this would turn the gravety off and on, and using some scripting, allowing the character to climb the ladder but I can not find a lua script for teh FPS char in editor.

any help where to find the script please in the microscript there is ony death, pickup and stuff like that but no movement..

thanks in advance.. :D
User avatar
epsilonion
Skyline Lead Moderator
Skyline Lead Moderator
 
Posts: 874
Joined: 26 Feb 2015, 11:51
Location: Hull, East Yorkshire, England
Skill: Business Manager
Skill: Great creative

Re: Player Movement

Postby TattieBoJangle » 17 Oct 2015, 14:06

you could use the jump function rather than gravity this would only work if you can control/change the jump speed height so the script would be press e to climb it would then jump to the height of the ladder.

There is probs a easy way of doing it :lol:
Case: CM Storm Trooper CPU: I7 5930k X99 Cooler: Noctua NH-D15 Graphics: Asus GTX 1080 Motherboard: Rampage Extreme V x99 Ram: RipJaws DDR4 3000mhz Storage: x2 SSD Crucial 500GB + x5 2TB Hdd PSU: Evga 1500w OS: Windows 10
User avatar
TattieBoJangle
Community Manager
Community Manager
 
Posts: 858
Joined: 26 Jan 2015, 00:15
Location: United Kingdom
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer
Skill: Great creative

Re: Player Movement

Postby SolarPortal » 17 Oct 2015, 14:10

Just spoke to StarFire and she reckons you can use the setPosition to move the player like in the teleport.

So, walk into triggerbox and setPosition with a vector3 at its current pos.
Reset the player position every frame to this position.
When key pressed to move up or down, increase the Y value of the setposition to move the character up and down the ladder.
You will need a deactivate at the top of the ladder though aswell.

The reason there is no lua to control the movement of the player is simply because it was all created and controlled in c++ and unlike the SCC or DCC, there is no lua functions to control its movement except setPosition.

It will work though with this i reckon. :)

Edit: There might be a gravity control though as well.
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: Player Movement

Postby StarFire » 17 Oct 2015, 14:13

I do have planned in to remake the FPS player as this version was only a proto and meant to be temporary lol.

There are still a few character scripts to complete then I will move onto the FPS. All this is being worked around any major dev tasks ;)
Dream the Journey, Live the Experience!
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1678
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer

Re: Player Movement

Postby epsilonion » 17 Oct 2015, 14:27

Wanted to do versions of crouch, prone just like Arma3 has.
Looking down sights of a gun (aim) and more...

I will sort it.. eventually.. :D

Might be easier to write my own player control script.
User avatar
epsilonion
Skyline Lead Moderator
Skyline Lead Moderator
 
Posts: 874
Joined: 26 Feb 2015, 11:51
Location: Hull, East Yorkshire, England
Skill: Business Manager
Skill: Great creative

Re: Player Movement

Postby StarFire » 17 Oct 2015, 15:53

Yes please feel free to develop your own FPS this can be done via Lua. ;)

The Skyline FPS has crouch + prone planned ( this requires a controller fix )and gun sight could be done now. You could look at the character scripts to get you started with locomotion. ;)
Skylines new version will combine Lua for ease of customization combined with actions and may be some bespoke code. ;)
Dream the Journey, Live the Experience!
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1678
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer


Return to Lua Scripting

Who is online

Users browsing this forum: No registered users and 2 guests

cron