The Daily Click ::. Forums ::. Klik Coding Help ::. Slow repositioning?
 

Post Reply  Post Oekaki 
 

Posted By Message

Oswalde



Registered
  10/06/2003
Points
  8
10th June, 2003 at 14:01:02 -

I am trying to make a game where the main character can pick up and use different weapons. I want each weapon to be a seperate active object that always sets its position to where the character's hand is.

The problem is, even when I use the event "always set postition to 0(x coordinate), 0(y coordinate) from active object 1," The weapon always lags behind the character whenever he moves.

Is there anyway to solve this problem?

 
n/a

Penguin Seph



Registered
  11/12/2002
Points
  1338
10th June, 2003 at 14:37:04 -

Are you using a costom movement or the normal one? And do you have TGF ot MMF? (Just asking)

 
Hi!

Lew



Registered
  06/01/2002
Points
  1014
10th June, 2003 at 15:05:23 -

You can experiment, if you hold down left, take 1 from alterable value, if you press right add 1, and limit it until its right-the use set Xposition to X(player) + value A and Y(player)+ value B. Sorry if it's not well explained.

 
<--intelligent, witty comment here-->

The Chris Street

Administrator
Unspeakably Lazy Admin

Registered
  14/05/2002
Points
  48488

Game of the Week WinnerClickzine StaffAcoders MemberKlikCast StarVIP MemberPicture Me This Round 35 Winner!Second GOTW AwardYou've Been Circy'd!Picture Me This Round 38 Winner!GOTM December Third Place!!
I am an April FoolKliktober Special Award Tag
10th June, 2003 at 15:36:59 -

Nononono, dont do that.

This way is so much easier, and is perfect.

PLAYER FACES LEFT DIRECTION: Set position of gun to Player at whatever, set direction to LEFT

PLAYER FACES RIGHT DIRECTION: Set position of gun to Player at whatever, set direction to RIGHT

Thats it!

 
n/a

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
11th June, 2003 at 01:17:24 -

The best way to do this is to use custom movement. (Dumb I.e) =

*Player pressed "Left" - player.x = player.x - 1, weapon.x = weapon.x - 1

This makes there be no lag on the repositioning.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Oswalde



Registered
  10/06/2003
Points
  8
11th June, 2003 at 10:07:12 -

Thanks! I was using normal movement before, but it worked a whole lot better to make a custom movement!


 
n/a

Shen

Possibly Insane

Registered
  14/05/2002
Points
  3497
11th June, 2003 at 11:21:41 -

Just make another active object with the movement, then always set the position of the weapon and the character to it.

 
gone fishin'
   

Post Reply



 



Advertisement

Worth A Click