Jump to content

Video tutorial incompatability. (LUA)


hislittlecuzin
 Share

Recommended Posts

I was watching this tutorial about a trigger that teleports players to a respawn point to mock a falling to one's death and respawning.

 

 

I noticed 2 differences which may or may not be problems. First in the code:

 

My code:

Script.respawnPoint = "" --entity "Respawn Point"
function Script:Collision(entity, position, normal, speed)
if(entity:GetKeyValue ("name") == ("Player")) then
 spawnPos = self.respawnPoint:GetPosition()
 entity.SetPosition(spawnPos)
end
end

 

his code:

 

Script.respawnPoint = "" --entity "Respawn Point"
function Script:Collision(entity, position, normal, speed)
if(entity:GetKeyValue ("name") == ("Player") then
 spawnPos = self.respawnPoint:GetPosition()
 entity.SetPosition(spawnPos)
end
end

 

As you can see in line 3, he lacks a second paranthasis after

("player")

 

A second difference is in my steam edition (which was claimed to be compatable) I am lacking some physics functions.

 

I have:

Physics mode;

collision type;

Mass;

Character angle;

Swept collision;

Nav Obstacle;

 

He has:

//all of that;

 

and shape functions such as:

shape;

shape offset;

shape rotation;

shape size;

 

 

What is wrong with my code? Everything else is exactly the same. Does his shape thing mean anything?

Steam client Leadworks Game Indie engine with Standard Leadworks Game engine plugin.

Link to comment
Share on other sites

A second difference is in my steam edition (which was claimed to be compatable) I am lacking some physics functions

While Jorn's videos are great, you must keep in mind that they are not official tutorials provided by Leadwerks. The date of that video was from last Summer, since then Josh has made several tweaks to the editor including removing the Physics Shape from an object's Physics Properties tab. This now has been replaced by using a visual Physics Shape that is built into the Model Editor as shown in the official Leadwerks tutorial about Models and Animation under the Collision section.

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...