Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Black areas with custom movement (https://forums.graalonline.com/forums/showthread.php?t=73236)

Twinny 04-02-2007 12:12 PM

Black areas with custom movement
 
Part of my custom movement system involves moving around without using keys. When doing this though, i often reach black areas of the map. For example, the leaping part uses
PHP Code:

player.-= cos(ang)*1.6;
player.+= sin(ang)*1.6

If a player just leaps using mouse without touching the keyboard, the tiles eventually go black but you can still see NPCs. The movement is done clientside but so are most movement systems. How can I fix this?

Chompy 04-02-2007 12:16 PM

try a sleep() before altering the x and y (0.05 for example)

I've seen this problem in an other thread, let me see if I find it..

Twinny 04-02-2007 12:20 PM

Quote:

Originally Posted by Chompy (Post 1295796)
try a sleep() before altering the x and y (0.05 for example)

Made it choppy but i still see black :(

It doesn't go black if you are holding down a movement key but since it itself can be custom scripted, do you just need to have one of the 4 directional keys down for it to load the map?

Chompy 04-02-2007 12:31 PM

Quote:

Originally Posted by Twinny (Post 1295797)
Made it choppy but i still see black :(

It doesn't go black if you are holding down a movement key but since it itself can be custom scripted, do you just need to have one of the 4 directional keys down for it to load the map?

I found the thread, but that was for a draisine tho..

but try put freezeplayer(0.1); before altering the x and y


thread:
http://forums.graalonline.com/forums...ad.php?t=65190

Twinny 04-02-2007 01:01 PM

freezeplayer() didn't work. I tried the disabledefmovement and it worked for a bit then the map updates when you enter new map area and it buggers up again. I tried doing playerenters() tests and such with no luck.

JkWhoSaysNi 04-02-2007 01:28 PM

I've only seen this happen on GMaps. I don't know how to fix it but it happens when you move between levels without triggering the level link.

edit: At a guess i'd say that calling setlevel2(player.level,player.x,player.y) after the move would fix it.

Chompy 04-02-2007 01:48 PM

Quote:

Originally Posted by JkWhoSaysNi (Post 1295823)
setlevel2(player.level,player.x,player.y)


That's serverside :[

Skyld 04-02-2007 01:53 PM

Quote:

Originally Posted by Chompy (Post 1295830)
That's serverside :[

Not only is it serverside, but it's setlevel2(levelname, x, y);.

Twinny 04-02-2007 02:04 PM

Any suggestions, Master Skyld?

cbk1994 04-03-2007 12:48 AM

Run to store and buy a copy of Windows Accelerat0r and run back to your computer, then jump up and down for a while then install the software. Now run your script! Everythings fixed! No more script! Graal won't start anymore! :D Problem solved!

napo_p2p 04-03-2007 01:00 AM

disabledefmovement always solved this problem for me before...

Crow 04-03-2007 01:23 AM

Quote:

Originally Posted by napo_p2p (Post 1296108)
disabledefmovement always solved this problem for me before...

I guess Zone is also using an own movement system, so they would also have to use disabledefmovement. But its also happening there ;o

Kristi 04-03-2007 03:09 AM

Quote:

Originally Posted by napo_p2p (Post 1296108)
disabledefmovement always solved this problem for me before...

Classic doesnt have this problem and we also use disabledefmovement at all times so this might do it...

Gambet 04-03-2007 03:17 AM

Quote:

Originally Posted by Kristi (Post 1296264)
Classic doesnt have this problem and we also use disabledefmovement at all times so this might do it...


Custom health system and a custom movement system.



We have been deceived, they are not really classic!



REBEL! REBEL! REEEEBBBEEEELLLLLLL!!!!!

Rapidwolve 04-03-2007 04:18 AM

Quote:

Originally Posted by Gambet (Post 1296267)
Custom health system and a custom movement system.



We have been deceived, they are not really classic!



REBEL! REBEL! REEEEBBBEEEELLLLLLL!!!!!

This is truex_x

Angel_Light 04-03-2007 10:26 PM

disabledefmovement(); is what Niromia had to use. We have to keep it in a timeout oddly enough or else the disabledef doesnt work for long. :/


All times are GMT +2. The time now is 03:09 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.