![]() |
Rotating?
how do you rotate an image instead of having it 4 directions? for example, a car. is it like:
PHP Code:
|
Here are some snippets from one of my car scripts.
To move in direction of angle: PHP Code:
PHP Code:
PHP Code:
|
well, ork made a car script that doesnt work, but it rotates the car. why wont it work?
PHP Code:
|
I would normally set the player's gani and just send parameters to the gani to control the angle of the car (using a gani script). This effectively hides the players and makes sure that all other players can see the rotation of the car.
From my initial inspection, the only thing I can see that would be causing a movement issue is that you should do: PHP Code:
|
PHP Code:
|
PHP Code:
and this.ang should be between 0 and pi*2 (if you're not into trig you can just use degtorad() to convert radians to degrees (for example: degtorad(360); degtorad(145); etc.) ) |
Quote:
|
Quote:
|
Quote:
If it worked for you, I'll bet if you remove that you pasted it will work, since you didn't edit the original script to use those functions.. |
Ya... I did that and changed the buttons so up is go instead of left. I said i fixed it up, I didn't say I made it...
|
Quote:
|
Quote:
Can you read... All I said was that "I FIXED IT UP A ABIT." There are no Fancy functions... I don't think. |
Quote:
|
Uhh... You can adjust the script for how fast you want to go, And it does work. Log on Riot.
|
Quote:
look at the bottom of your script o_o |
Quote:
PHP Code:
PHP Code:
and change that var based on how fast the car would drive.. |
i found the problem. now, how do i make it so a player cant walk?
|
Quote:
My guess is that there is a custom movement system that is interfering with the car script. You will probably need to disable that movement system while someone is in a car. |
Quote:
|
Quote:
That script is able to go over walls because you need to add some onwall detection :P. I think you have the skills to play around with onwall detection yourself. If you hit a snag, you know where to ask :). |
Quote:
PHP Code:
|
Quote:
|
and now a new problem showed up, you can only see yourself rotate on your screen. you cant see anyone else rotate, and no one can see you rotate.
|
Doesn't the img index have to be like 200+ ??
|
Quote:
(some very low negative number) to -1 are local (client only) 0 to 200 makes it so other players can see it index 200 ++ up are local (client only) Quote:
http://forums.graalonline.com/forums...ad.php?t=78118 and set client.rotation to wanted rotation number :) |
Quote:
so PHP Code:
PHP Code:
|
Quote:
|
Quote:
|
Quote:
you set client.rotation = this.ang; But then you would need to gani the car tho |
Quote:
|
Quote:
|
there is another car script i found, and it does gani, but it shows the car under you not rotating, but the direction is right. this was by chris.
PHP Code:
|
Quote:
|
Quote:
|
Quote:
Don't actually put index, replace it with whatever index your showimg() is. |
Quote:
|
You should be putting the showimg function in the gani script.
|
Quote:
|
Sorry, i cant edit the last post, but i get what you mean by gani script, so how would i make it so the gani can turn in the script?
would i use PHP Code:
|
| All times are GMT +2. The time now is 11:37 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.