Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (7th_zorro), 1,390 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Problems with attaching sword to entity. #140211
07/09/07 13:34
07/09/07 13:34
Joined: Mar 2007
Posts: 27
P
PeterM Offline OP
Newbie
PeterM  Offline OP
Newbie
P

Joined: Mar 2007
Posts: 27
Hey.

It's not what you think i searched the forum and i found the answer here:
http://www.coniserver.net/ubbthreads/sho...true#Post730752

Now I have attached the sword to the player, but when i move the player
sword lags a little behind. The faster player moves farther away is the sword.
I made a picture to explain better.

Link To Picture

On seckond and third picture player moves to the right and to the left.
And you can see how sword stays behind.

How can i fix that?

Tnx for your help.

Re: Problems with attaching sword to entity. [Re: PeterM] #140212
07/09/07 18:24
07/09/07 18:24
Joined: Jan 2007
Posts: 221
F
Fenriswolf Offline
Member
Fenriswolf  Offline
Member
F

Joined: Jan 2007
Posts: 221
Hi,

the reason for this behaviour is the execution order of your functions.
If your 'attaching sword to entity' code is executed prior to your player's movement code, the sword is logically placed where the player was located one frame before.

Well, you could merge both scripts and call the attaching code right after the movement code to solve the problem.
Maybe putting the wait instruction of you attaching code right at the beginning of the while loop or using proc_late could work as well.

Re: Problems with attaching sword to entity. [Re: Fenriswolf] #140213
07/09/07 19:11
07/09/07 19:11
Joined: Mar 2007
Posts: 27
P
PeterM Offline OP
Newbie
PeterM  Offline OP
Newbie
P

Joined: Mar 2007
Posts: 27
thank you Fenriswolf for the answer I putted the code after ent_move function and it works great now.


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1