Search found 102 matches

by Imaculata
Sun Sep 25, 2016 11:14 am
Forum: Support and Development
Topic: Simple question about tables
Replies: 10
Views: 1942

Re: Simple question about tables

You mean [emittype], instead of [emitter_splash], no? Well, to clarify, what I was doing was sending the value emitter_splash to another script, which then used that value within emittype . In other words, emittype is a local value that contains emitter_splash , which was nil , since I called it fr...
by Imaculata
Sat Sep 24, 2016 8:41 am
Forum: Support and Development
Topic: Simple question about tables
Replies: 10
Views: 1942

Re: Simple question about tables

Thanks Bartbes ! I knew it had to be something simple. I didn't realize that I could just substitute emittertypes[emitter_splash] for emittertypes["emitter_splash"] , and that it would simply pick up the name that I had included in the table. That makes things a lot easier. It's working now. I'll po...
by Imaculata
Fri Sep 23, 2016 3:04 pm
Forum: Support and Development
Topic: Simple question about tables
Replies: 10
Views: 1942

Simple question about tables

I couldn't find any good documentation on tables in lua, and my problem is a very simple one. I'm coding a simple particle system for my game that spawns particle emitters on the fly. These particle systems are all predefined in a table, and I want to be able to call upon them, so that I can add the...
by Imaculata
Mon Feb 15, 2016 3:56 pm
Forum: Support and Development
Topic: Please help with classes for npcs
Replies: 13
Views: 2097

Re: Please help with classes for npcs

Short update. The game now renders npc's, along with their animations, and correctly places their names above their heads if you are within line of sight range. The character graphics are currently just placeholders. Blue rectangles represent men and pink rectangles represent women. Simple arrows sh...
by Imaculata
Mon Feb 15, 2016 12:43 pm
Forum: Support and Development
Topic: Please help with classes for npcs
Replies: 13
Views: 2097

Re: Please help with classes for npcs

Ah, thanks. I'll look into that. First I'll see if I can get the npc's to render, and display their names above their heads. Once I've got that working, I'll start doing some line of sight stuff, and try and make their names fade out if they too far away from you, or can't see you.
by Imaculata
Sun Feb 14, 2016 1:17 pm
Forum: Support and Development
Topic: Please help with classes for npcs
Replies: 13
Views: 2097

Re: Please help with classes for npcs

Alright, so I should probably just rename it to "npc", and store the npc's in a different array of their own (and not in bump's world). That would at least make them more easy to access. The player won't be colliding with the npc's directly, nor will the npc's will be colliding with each other. I wa...
by Imaculata
Sat Feb 13, 2016 6:46 pm
Forum: Support and Development
Topic: Please help with classes for npcs
Replies: 13
Views: 2097

Re: Please help with classes for npcs

Alright, I've hit my first roadblock. So I succeeded in making a list of npc's, and I now add them to bump's world. According to the documentation of bump, it's collision system should also work just fine as an object repository. And that's all well and nice, but I'm unsure how to collect the proper...
by Imaculata
Fri Feb 12, 2016 4:37 pm
Forum: Support and Development
Topic: Please help with classes for npcs
Replies: 13
Views: 2097

Re: Please help with classes for npcs

Ah, thanks a lot. This clears up a lot of confusion. I'll try and get this working over the weekend, and update this thread as things progress. Thanks a lot for all your input and clear explanations.
by Imaculata
Fri Feb 12, 2016 1:49 pm
Forum: Support and Development
Topic: Please help with classes for npcs
Replies: 13
Views: 2097

Re: Please help with classes for npcs

Imaculata = npc:New( ) Imaculata.hp = 10 Imaculata:TakeDamage( 10 ) This area confuses me. As I understand it, you are creating a new npc class that is stored in the value "Imaculata". And then you change the ".hp" property of "Imaculata" to 10. You then call the function "TakeDamage" within "Imacu...
by Imaculata
Fri Feb 12, 2016 1:04 pm
Forum: Support and Development
Topic: Please help with classes for npcs
Replies: 13
Views: 2097

Re: Please help with classes for npcs

Also, take note of npc.TakeDamage - the first parameter in the function is "self", which means that when you later on do Imaculata:TakeDamage(10), the code will damage the Imaculata-table, not the npc-table. First of all, I'm still going through your code, and fiddling with it to see if I can get i...