Jump to content

LE3 : Call to a function ?


YouGroove
 Share

Recommended Posts

i have a script :

simpleMov.lua

 

 

this function

 

function Script:placeProjectile()
local targetpos = self.entity:GetPosition(false) 
   model:SetPosition(targetpos.x,targetpos.y,targetpos.z)

end

 

 

And i would want ot call it from updatePhysics method.

 

 

function Script:UpdatePhysics()
...

self.entity:SetInput(0,move,strafe)

if window:KeyDown(Key.Space) then 
  simplemov:placeProjectile(entity.goblinai)
end

end

 

 

But it don't work ?

Someone know how to call the function ?

Sadly on AI.lua, Player.lua, there is only callbacks, not direct calls as this one i want to do :(

Stop toying and make games

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...