Forum

> > CS2D > Scripts > Rotate player
Forums overviewCS2D overview Scripts overviewLog in to reply

English Rotate player

38 replies
Page
To the start Previous 1 2 Next To the start

old Rotate player

J4x
User Off Offline

Quote
Hi, i open the info txt and i was looking for some player values, then i found the look one, for what's this value?

EDit: Title fixed, didn't pay attention, to what i write ^ up
edited 2×, last 09.03.11 10:11:35 pm

old Re: Rotate player

Yasday
User Off Offline

Quote
For the "look" of the player he chooses, like for the first T, look is 0 for the second one, look is 1.

old Re: Rotate player

J4x
User Off Offline

Quote
ok, thanks.
PS: Is there any fomr to make a player rotate with lua?

old Re: Rotate player

DC
Admin Off Offline

Quote
(it is not possible because rotating a player with Lua doesn't make any sense because the player always looks at the mouse position of the corresponding client. so the rotation set via Lua would instantly be changed/overwritten. resulting in no effect at all.)

old Re: Rotate player

KimKat
GAME BANNED Off Offline

Quote
If you put a "always"-hook on it there probably will be a difference though, as the always hook will always execute the lines of code within the script. So if you set so that the player rotates 1- degrees, right? well, it will be looking left, or spinning around left always. Unless you interupt it, but as soon as you are afk or don't move mouse it will still be rotating.

However it would look rather silly, but this could be used as a TK penalty or something. If you TK somebody you'd get a list of TK punishment options for the player who killed you. I'd love a list like that implemented in CS2D. I've made a Lua together with BlazedEye a while ago that sends a TKer to jail for certain amount of time. The jail on de_dust would be the closed area, where the crates are... possibly bad explanation but you'll see it soon enough if you inspect the map a bit.

I love Lua scripts sometimes, they make CS2D so much fun. Haha.

old Re: Rotate player

J4x
User Off Offline

Quote
Kimkat can u explain me how?
edited 1×, last 09.03.11 05:46:38 pm

old Re: Rotate player

Yasday
User Off Offline

Quote
You can't...
Edit:
Oh, wait, you can, but only your own player and only with the mouse.

old Re: Rotate player

KimKat
GAME BANNED Off Offline

Quote
Well, if you made a Lua like that it'd be possible. I got no energy to make one though.
And I don't care if it was ment to be funny or not, lol. Just in for the info.
I was just saying that it's possible through Lua, not just by looking around with the mouse... I ment when you're not controlling the player, just leave the player standing with a Lua script running to make the player spin around, stopping at nothing. Duh, obviously.

old Re: Rotate player

KimKat
GAME BANNED Off Offline

Quote
FN_Linkin Park has written
Well, can u atleast gimme a base?
Well, it'd have to be tomorrow. No time for this now.

Perhaps this Lua would do.
1
2
3
4
5
6
7
8
9
rot = 0
addhook("always","spinning_around")
function spinning_around(id)
rot = 0
rot_player = player(id,"look")
	if player(id,"exists") then
		rot_player = rot + 1
	end
end
Similar to it anyways.

old Re: Rotate player

J4x
User Off Offline

Quote
thanks, my purpose is that why you are sniping then the played moves from side to side, like in batlefield.^_^

PS: Wtf? why u put
1
rot_player = player(id,"look")
it shoudl be
1
rot_player = player(id,"rot")
.

old Re: Rotate player

KimKat
GAME BANNED Off Offline

Quote
Well, sorry I'm just confused today... seriously, lol.
Anyways, I downloaded CS2D today to my laptop and I see your point now.

I just make long code short using variables, it's very cool, and useful and uhm... I ran out of lines.

Anyways, it's good shit.

old Re: Rotate player

Yasday
User Off Offline

Quote
Anyways, it won't work, you cannot change the rot of any player( exept of your own one ).
To the start Previous 1 2 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview