![]() |
Looking for a solution
Hello. I need some help. I have a showImg shadow and I want it to follow player and it does. But the problem I am running into is when the player jumps, the shadow also follows the player's y value so there is no sense in depth when jumping. (Keep in mind player can move in all 4 directions just like default movement.)
So I come to you forums in need of help. Some information on the jump action: The player's y value goes -0.5 when jumps for a time of (0.5) The player's y value goes +0.5 when falling for a time of (0.5) So the jump is (1) total in time. The Jump and Fall are just ran through a looping script. Jumping works perfect, the shadow just doesn't like to. I've tried: 1. Keeping the y value at one point once the player has left the ground. Problem: When you move up or down while jumping, the shadow jumps when you land. 2. A bunch of sleeps(); Problem: Glitchy 3. A butt load of scheduleEvents() Problem: Even more glitchy. PHP Code:
|
The player's z property changes when jumping (I believe) so try changing the z property of that image object to match the player's z property.
|
Quote:
|
Take a look at the changeimgzoom(id,factor) function.
|
Quote:
|
Quote:
|
first off: why are you using that kind of shadow instead of the default one in the ganis?
seccond thing: watch your if() statements |
Quote:
|
Quote:
PHP Code:
PHP Code:
|
Quote:
|
Have you tried using the player.z variable for your jump?
|
This is something that could work. Not 100% sure but I can't see something wrong
PHP Code:
|
Quote:
I just simply change the z value of the player and the shadow stays at (player.x), and (player.y-player.z) Works like a charm. I never knew about the z factor til yesterday so I would like to thank you graal forums for making life a lot easier on me lol |
All times are GMT +2. The time now is 06:35 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.