metaldc4life Posted September 8, 2014 Posted September 8, 2014 hi, I am brand new to this and was wondering how I add multiple scripts like an inventory script to the player... I pm'ed Josh on this one and I didn't quite understand much of it (sorry Josh =/) here is what I put: my main question is how do I add multiple scripts to a player character so I can add inventory, health bar etc. to him?? and he put: "We use a design of one script per entity. This eliminates a lot of problems when you are writing more advanced scripts. For example, with our system it's easy to find the "health" value of an entity: health = entity.script.health During development, we also tried it with multiple scripts and found it got really messy very quickly. " I really do appreciate everyone's input (especially Josh's) but I just don't understand this yet so if anyone can help I would be a million times grateful! =) Quote
AggrorJorn Posted September 8, 2014 Posted September 8, 2014 Every entity can have 1 script. Create a pivot and drag in under the base entity and you can attach a new script on that. This tutorial covers a healthbar and shows how you can attach it to the player. 1 Quote
metaldc4life Posted September 8, 2014 Author Posted September 8, 2014 do you know how I can create a pivot? Thank You! Quote
metaldc4life Posted September 8, 2014 Author Posted September 8, 2014 oh! lol Thank You SO Much! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.