Jump to content

Why does this all of a sudden not work?


Slastraf
 Share

Recommended Posts

The most annoying script i have worked on.

So , yesterday I wanted to make a completely new set up of the rpg camera because my old one was not good.

So far everything workED , the player goes to the point where you click .

 

Now it doesnt . I have literally changed nothing, and I am unmotivated because today I was doing nothing, too , because of that.

Thats how you set it up:

 

the target of the camera is the player

 

post-12189-0-79449000-1453749739_thumb.png

 

 

EDIT: remvoed the script because you need to use window:MouseDown(1) if you want to use it with a camera pick.

Link to comment
Share on other sites

It could be that you have:

 

function Script:GoToPoint(destination1)
self.destination = destination1
System:Print( ">>is moving")
end

 

This function has the same name as the one you use for pathfinding.

Try changing this to something else.

 

I also noticed that you have a camera pick in the player and the camera script, which look like they are trying to do the same thing (It doesn't seem like an issue, but I though you should know).

Link to comment
Share on other sites

It could be that you have:

 

function Script:GoToPoint(destination1)
self.destination = destination1
System:Print( ">>is moving")
end

I also noticed that you have a camera pick in the player and the camera script, which look like they are trying to do the same thing

With the one I want to pick an enemy (because its easyer to make it directly from the player)

Link to comment
Share on other sites

Something that I always hated with the KeyDown and KeyHit, was that if you use them in multiple scripts, they can give back different results since they could have been used in a different script. I think I had similar problems with mouse Hit as well, but I am not sure.

 

 

So for instance you have two scripts, both check for the space bar hit. Script 1 says that the spacebar has been hit, but script 2 says it has not been hit. That is because Leadwerks sets a 'hasBeenHit' flag to false once you have requested it in script 1.

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