Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (AndrewAMD, TipmyPip), 12,420 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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 | 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