I've completed the main Lua tutorial on the basics, where now? :s
82 replies, posted
[QUOTE=cis.joshb;29443295]You might want to use [url=http://wiki.garrysmod.com/?title=Ricky's_Example_SENT]Ricky's Example SENT[/url]. The ball has some stuff with sprites and effects, the Example SENT uses an actual model.[/QUOTE]
If the ball uses no model what's this
[lua]self.Entity:SetModel( "models/Combine_Helicopter/helicopter_bomb01.mdl" )[/lua]
[QUOTE=King Flawless;29443515]If the ball uses no model what's this
[lua]self.Entity:SetModel( "models/Combine_Helicopter/helicopter_bomb01.mdl" )[/lua][/QUOTE]
He said it uses an actual model dude... no edits on his post either
[QUOTE=faceguydb;29444577]He said it uses an actual model dude... no edits on his post either[/QUOTE]
The code he posted is from the ball sent.
[QUOTE=King Flawless;29443515]If the ball uses no model what's this
[lua]self.Entity:SetModel( "models/Combine_Helicopter/helicopter_bomb01.mdl" )[/lua][/QUOTE]
the ball sent only uses the ball model to simulate the shadows on the ground. the "model" you see in game is just a sprite, and the collision sphere and physics are written in LUA.
and yes the ball sent uses a model(but just for the shadows).
I know, I was just proving that it uses a model and that he was wrong.
So how do I make it so that the sprite is no longer generated and the entity is a model?
I find it unlikely you are done reading pil yet
I have not read pil and nor will I as that is not how I learn and it will not work for me. I learn by doing practical things, if I'm just reading constantly I will not learn it as well as actually doing something practical such as writing a learning how something can be used in a script by writing a script with whatever it may be in it.
[QUOTE=Ninel;29450145]I have not read pil and nor will I as that is not how I learn and it will not work for me. I learn by doing practical things, if I'm just reading constantly I will not learn it as well as actually doing something practical such as writing a learning how something can be used in a script by writing a script with whatever it may be in it.[/QUOTE]
you really should take a look at it.you don't really get better in lua when you just look at code in gmod and doing "practical things". you have to learn the non gmod lua.
[QUOTE=Ninel;29449804]So how do I make it so that the sprite is no longer generated and the entity is a model?[/QUOTE]
I removed the sprite from the sent, but then...
[img_thumb]http://theroyalflash.ch/img/img.jpg[/img_thumb]
:wtc:
[QUOTE=kaukassus;29450433]you really should take a look at it.you don't really get better in lua when you just look at code in gmod and doing "practical things". you have to learn the non gmod lua.
I removed the sprite from the sent, but then...
[img_thumb]http://theroyalflash.ch/img/img.jpg[/img_thumb]
:wtc:[/QUOTE]
I appreciate I need to know non-gmod lua, but it just doesn't seem to be the right way for me personally to learn, I wont remember from just reading long articles on it. Also, I appreciate your help and I'm not saying it's a bad idea, it's just not for my learning type.
What code did you remove, because at one stage I removed a part of the code and there were no errors, but you could not interact with the entity, it stayed still and it was still a coloured sphere.
[QUOTE=Ninel;29450566]I appreciate I need to know non-gmod lua, but it just doesn't seem to be the right way for me personally to learn, I wont remember from just reading long articles on it. Also, I appreciate your help and I'm not saying it's a bad idea, it's just not for my learning type.
What code did you remove, because at one stage I removed a part of the code and there were no errors, but you could not interact with the entity, it stayed still and it was still a coloured sphere.[/QUOTE]
to remove the sprite from the ent
just remove this line from the cl_init.lua
[lua]render.SetMaterial( matBall )[/lua]
and the reason it probably messed up, is because I changed this line in the cl_init.lua
[lua]ENT.RenderGroup = RENDERGROUP_TRANSPARENT[/lua]
to
[lua]ENT.RenderGroup = RENDERGROUP_BOTH[/lua]
[QUOTE=King Flawless;29449629]I know, I was just proving that it uses a model and that he was wrong.[/QUOTE]
Summary of King Flawless: Prove people wrong for know reason, even though their point is right.
[editline]26th April 2011[/editline]
[QUOTE=Ninel;29449804]So how do I make it so that the sprite is no longer generated and the entity is a model?[/QUOTE]
Use Ricky's example SENT. The same with no sprite stuff you have to remove.
[editline]26th April 2011[/editline]
And I have actually looked at the Ball SENT code, and I knew it used a model for the shadows.
Incase some haven't noticed, I didn't ask for help in flaming, I asked for help in lua, so just remember that.
[QUOTE=Ninel;29453069]Incase some haven't noticed, I didn't ask for help in flaming, I asked for help in lua, so just remember that.[/QUOTE]
I think all of us can read. I am giving you valid help. Flawless is proving that I made a factual error for no reason, although the concept was right.
Obviously some people can't read and I wasn't saying it to you, you're providing help whereas others are just being complete assholes towards just because they think you got something wrong.
[QUOTE=Ninel;29453265]Obviously some people can't read and I wasn't saying it to you, you're providing help whereas others are just being complete assholes towards just because they think you got something wrong.[/QUOTE]
Actually people are suggesting other ways of learning as perhaps you are not learning as efficiently as you could using your current method.
[QUOTE=Proost;29460598]Actually people are suggesting other ways of learning as perhaps you are not learning as efficiently as you could using your current method.[/QUOTE]
I have no problem with other people suggestion other methods or other ideas, its the flaming that is bothering me if you had have read my post here: [QUOTE=Ninel;29453069]Incase some haven't noticed, I didn't ask for help in flaming, I asked for help in lua, so just remember that.[/QUOTE] The flaming bothers me even more when it is completely unnecessary and is just a few people trying to look extremely intelligent in front of new lua coders, I'm not saying that some people are extremely intelligent either, what I am saying is that we [new lua coders] don't need it in our threads when we're trying to learn.
Valid points are being made. You should know that by responding to flamers asking to stop, it wouldn't.
As far as flaming goes, I don't really see any. Just continue learning instead of pointing it out. You've been supplied with a good amount of help and should be grateful you have people helping you. I say this being one who is learning lua as well.
As far as the arguments go, there really is no point. Either way, it is teaching more methods of approaching situations so some competition can't be all bad.
[QUOTE=Ninel;29460742]I have no problem with other people suggestion other methods or other ideas, its the flaming that is bothering me if you had have read my post here: The flaming bothers me even more when it is completely unnecessary and is just a few people trying to look extremely intelligent in front of new lua coders, I'm not saying that some people are extremely intelligent either, what I am saying is that we [new lua coders] don't need it in our threads when we're trying to learn.[/QUOTE]
no one is flaming in this thread. they just provide constructive critism.
How can you learn from other peoples code if you don't understand how it works and the best way to do that is by reading pil.
If you take the path you are currently taking you will be unable to do things for your self only being able to edit other peoples work.
If you take the path of reading pil you will be able to stand on your own two feet.
[editline]27th April 2011[/editline]
[QUOTE=cis.joshb;29452994]Summary of King Flawless: Prove people wrong for know reason, even though their point is right.[/QUOTE]
How can you be proved wrong for no reason, if I am able to prove you wrong it makes what you are saying wrong otherwise I wouldn't be able to do it now would I?
[QUOTE=Cireric;29461406]You've been supplied with a good amount of help and should be grateful you have people helping you. .[/QUOTE]
Gratefulness is shown here:
3nd post [QUOTE=Ninel]Thank you for the link[/QUOTE]
5th post [QUOTE=Ninel]Thanks for your reply[/QUOTE]
8th post [QUOTE=Ninel]Thank you for your reply and support.[/QUOTE]
15th post [QUOTE=Ninel]Thanks for your reply[/QUOTE]
23nd post [QUOTE=Ninel]Thanks for your reply[/QUOTE]
28th post [QUOTE=Ninel]Thanks Buggzie, that really helped[/QUOTE]
40th post [QUOTE=Ninel]I appreciate your help and I'm not saying it's a bad idea, it's just not for my learning type.[/QUOTE]
[QUOTE=King Flawless;29462174]How can you learn from other peoples code if you don't understand how it works and the best way to do that is by reading pil.[/QUOTE]
This may be true, but you can't understand something if you don't remember the stuff you read from pil and I wont remember it.
That's why you should be testing everything you learn on pil after you learn it, if you cant remember it then read it again until it sticks.
[QUOTE=King Flawless;29462904]That's why you should be testing everything you learn on pil after you learn it, if you cant remember it then read it again until it sticks.[/QUOTE]
Hmm, sounds like a good idea, but how do you mean I should test it; write scripts with the new gained information?
[QUOTE=Ninel;29464529]Hmm, sounds like a good idea, but how do you mean I should test it; write scripts with the new gained information?[/QUOTE]
Yes use [url]http://www.lua.org/demo.html[/url] to test the things you learn by making random things and testing the sample code from pil to gain a better understanding of how it all works
[QUOTE=King Flawless;29464779]Yes use [url]http://www.lua.org/demo.html[/url] to test the things you learn by making random things and testing the sample code from pil to gain a better understanding of how it all works[/QUOTE]
Ok, I've just used it briefly there now, is Msg a GMOD lua function?
[QUOTE=Ninel;29464877]Ok, I've just used it briefly there now, is Msg a GMOD lua function?[/QUOTE]
Nearly all of the standard lua functions work in gmod and the ones that don't are more advanced than you will be for a while
[QUOTE=King Flawless;29464943]Nearly all of the standard lua functions work in gmod and the ones that don't are more advanced than you will be for a while[/QUOTE]
I tried Msg("Message") in the demo and it didn't work.
O sorry I misread your post ye Msg is gmod only use print instead
[QUOTE=Ninel;29465172]I tried Msg("Message") in the demo and it didn't work.[/QUOTE]
Yes, because Msg isn't standard Lua. He said that standard functions work in GMod, not other way around.
:arghfist::ninja:
Is there a difference between print and Msg("") in GMod lua i.e. will they appear any different when they are ran?
Sorry, you need to Log In to post a reply to this thread.