Help with your scripting

Scripting help

Scripting help

Postby gamemaker123825 » 13 Feb 2016, 05:34

Hello :)
I'm not a scripter and I dont know where to start, but I just want to add a npc that when you press enter or another key to talk and it show the message, can someone please show me how its done to do that or where would be a good place to start learning scripting Lua. Thank you :)
The new wave of games and programming visit us at.
http://zorgorofstudio.com
andrew@zorgorofstudio.com
User avatar
gamemaker123825
Skyline Initiate
 
Posts: 13
Joined: 04 Jun 2015, 07:49
Location: La Palma Ca USA
Skill: 3D Modeller
Skill: Programmer
Skill: Level Designer
Skill: Network guru
Skill: Scripter

Re: Scripting help

Postby Shando » 13 Feb 2016, 06:38

Hey buddy,

If you're not a scripter, then I can safely say that a complete "Chat" system is not an easy thing to create (I actually created one that's available on the Skyline Store and it took me quite a while to get it to work correctly!).

To learn Lua, the best place to start would be to buy one of the many Lua books out there, or you could use one of these online resources:

"Programming in Lua" - http://www.lua.org/pil/
"Lua Programming" - https://en.wikibooks.org/wiki/Lua_Programming

Finally, there's also a tutorial here: http://www.tutorialspoint.com/lua/

The main thing to be careful of is the actual version of Lua (I think Skyline is still on v5.1) as things have changed between versions, but these changes probably won't affect someone just starting out ;)

Regards

Shando

PS: If you get really stuck, try googling as places like Stackoverflow (http://stackoverflow.com/) have heaps of knowledge available with a simple Google search :D Failing that, just ask here and we'll certainly try our best to help!

PPS: You could also take a look at this forum post http://www.forum.aurasoft-skyline.co.uk/viewtopic.php?f=14&t=1131&p=5787&hilit=dialogue#p5787 which uses a pop-up when a player enters a trigger volume
Ryzen 7 4800H 16GB GTX1650 Win 11 64
Love, Hope, Strength http://www.lovehopestrength.co.uk
User avatar
Shando
Skyline Moderator
Skyline Moderator
 
Posts: 560
Joined: 06 Mar 2013, 22:35
Location: Moffat Beach, Queensland
Skill: Programmer
Skill: Scripter
Skill: Level Designer

Re: Scripting help

Postby SolarPortal » 13 Feb 2016, 12:48

@gamemaker123825, Welcome to the forums :D We hope you enjoy the engine and are able to create the games you want to make :)

Yes, Shando made a really cool chat system which came with its own editors for customizing whats said from the NPC's. I can't see the link above, so i will post it here for you: http://www.chi-ad.com/Skyline/AssetStore/index.php?route=product/product&product_id=190

Those tutorials and links will be very helpful to you and i also have got many answers from these sites myself.

If you get stuck with getting a basic script to run, then i am sure one of us can provide a solution or help you out with the problem. Everyone has to start somewhere and not be penalised for it so welcome to the engine :)

We do have the new Visual module system being developed and new mechanics are being made every few days. We may not have the modules to support an NPC Chat system yet, but it will get there. The great thing about this system is that there is no scripting involved and is simple block connections.

Anyway.. i shall let you get on and look forward to seeing how it goes for you :)
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: Scripting help

Postby cassius_b » 05 Apr 2016, 19:41

Not sure he was asking for a complete chat system but just for a simple code example.
Beginners need to see actual code.
cassius_b
Skyline Ensen
 
Posts: 154
Joined: 21 Mar 2016, 13:45
Skill: 3D Modeller
Skill: Programmer

Re: Scripting help

Postby CreativeOcclusion » 05 Apr 2016, 20:49

http://blog.aurasoft-skyline.co.uk/mechanics-action-based-activate-message/#more-270

This would be a good example to start with...I believe StarFire put this up in the Blog...It explains how to activate a message and has a download for the code and a plugin....I believe the code and plugin are now included with the engine in
Asset Library/Scripts/Combination Scripts/Mechanic-Activate Message

It does not create a chat system, but does show how to create a pop up message...
This is a great Blog to study...Hope this helps...CO
Thanks, CreativeOcclusion
User avatar
CreativeOcclusion
Skyline Warrior
 
Posts: 366
Joined: 22 Jun 2015, 19:34
Location: Texas


Return to Lua Scripting

Who is online

Users browsing this forum: No registered users and 10 guests

cron