-
Posts
1,278 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Posts posted by Thirsty Panther
-
-
Thanks Ma-Shell, useful information there.
I'm going to work thru some examples this weekend to try and get my head around all this.
Had a quick look at classes and inheritance last night. I will need to go thru this again as well.
Thanks for the help.
-
Sensei I believe I have found another test.
In the Vector lesson should the code for a vector of integer values be
std::vector <int> myvector;
and not
std::vector myvector;
And the code for a vector of strings should be
std::vector <string> myvector;
And in Lists should we also declare which data type we are going to use.
std::list <int> mylist; or std::list <string> mylist;
As a general rule what are the strengths and weaknesses of arrays, vectors, maps and lists.
I assume arrays are less memory hungry as their size doesn't change but are less flexible.
Vectors look like they could be difficult to keep track of.
Maps look similar to how tables work in Lua.
- 1
-
Thank You Sensei.
-
Thanks gentlemen for the clarification. I thought it was a cut and paste error.
There is a couple of "s written as quote in the Loop section of the tutorial as well.
There is also a mention of Lua in the start of the Loop tutorial, not sure if thats a cut and paste issue.
I'm going OK just started arrays, vectors and containers. Its a bit of a step up from Lua but I'm feeling a little more comfortable with C++ than I thought I would.
-
I'm working my way thru the C++ tutorials and I've gotten to the if statement part.
#include "Leadwerks.h"; int main(int argc, const char *argv[]) { if (2>1) { Print("Two is greater than one!"); } }
Then the explanation of the code is given as.
"The above code tests to see if two is greater than one (it is!) and then goes on to execute the code inside the statement. The statement is terminated with the "end" keyword. So we know the above code would print out the word "true" when run."
Isn't this wrong?
The statement end with the } doesn't it? and not the "end" keyword. 2>1 is true but would print "Two is greater than one!" as we have told it to do if 2>1.
- 1
-
I think point is what you are after.
https://www.leadwerks.com/learn?page=API-Reference_Object_Math_Transform_Point
- 1
-
Hi Colin , welcome to the forums.
I believe the brush chosen is whatever the last brush you used was.
I think this even happens if you start a new project Leadwerks will use the previously used brush.
- 1
-
6 hours ago, ?Yue? said:
Any website with FX of fire, water, smoke, for particulate systems?
Shadmar has a Firepit in the Workshop.
https://steamcommunity.com/sharedfiles/filedetails/?id=312811332&searchtext=
There are also smoke and spark emitter examples there as well.
-
What material do you have loaded for your Emitter?
If you change it to "Default" do you still get the same result?
I have made the same scene as you and it works fine. On my laptop I get 60 fps with no lag.
Is the material you are using a sprite sheet? In which case you will need to set up the uv animations in the emitter settings.
P.S. I enjoy watching your videos.
-
On 10/24/2019 at 12:32 PM, ?Yue? said:
Thanks for the information, but that doesn't have an example. I can deduce that it sets a number as a minimum and a maximum, but I have no idea how to implement it, the translator does not help much without an example.
In your code you will want to "clamp" the self.sWheel variable.
Math:Clamp(self.sWheel,0,30)
You will need to alter the 0 to whatever minimum value you wish to set your zoom to.
The 30 value will be your maximum zoom value.
- 2
-
There is GoToPoint but It is used for walking characters and wouldn't work for a camera.
-
-
Try this thread, its old but should give you an idea about how to do this.
There is a note script is available in the workshop also.
https://steamcommunity.com/sharedfiles/filedetails/?id=388493460&searchtext=
-
Try here
Its based on Ricks old video.
https://www.indiedb.com/engines/leadwerks-engine/videos/teleport-tutorial-by-rick
-
You need to make a camera pick after you make your mouse down is registered.
https://www.leadwerks.com/learn?page=API-Reference_Object_Entity_Camera_Pick
I explain its use in a post I made for Operation Wolf remake.
- 1
- 1
-
Hard to tell without seeing your code but I'm guessing you are not resetting your variable for the key press for the first question.
ie Question one: Answer = "F3"
Question two: Answer = still equals "F3" from question one.
Hope this helps.
Good to have you back.
- 1
-
Nice.
Maybe a little randomness on the leaves would make them a little more realistic. They act like missiles now.
-
Sorry, just read your discussion on Discord.
Josh should have solved the problem.
-
So on the Forum home page in the top right hand corner there should be a box "Recent Status Updates" and a text box asking "Whats on your mind?"
Is this missing for you?
-
From memory Josh said there was no difference.
Ah here it is.
- 1
- 1
-
If you are using the default Monster AI script then the part you are looking for is:
function Script:Hurt(damage,distributorOfPain) if self.health>0 then if self.target==nil then self.target=distributorOfPain self:SetMode("attack") end self.health = self.health - damage if self.health<=0 then self.entity:SetMass(0) self.entity:SetCollisionType(0) self.entity:SetPhysicsMode(Entity.RigidBodyPhysics) self:SetMode("dying") end end end
After the self:SetMode("dying") place your code to increase the number of kills.
Kills= Kills + 1
-
It seems Aggror has removed a lot of his Leadwerks Videos.
Project Saturn along with his C++ videos are no longer on YouTube.
Maybe he thought they were too old.
-
-
How do I tell if a variable is odd or even using Lua?
% is used in other languages is it the same with Leadwerks?
C++ Tutorial error?
in Leadwerks Engine Bug Reports
Posted
Not sure on this one.
In the Windows create function example, in the while loop we update the time with
Leadwerks::Time::Update();
Could we just use
Time::Update();
as we have already specified "Leadwerks" in the using namespace call.