Forum

> > CS2D > Scripts > Rotate player
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Rotate player

38 Antworten
Seite
Zum Anfang Vorherige 1 2 Nächste Zum Anfang

alt Re: Rotate player

Yasday
User Off Offline

Zitieren
You should've given up when DC said
DC hat geschrieben
(it is not possible ...

he's the creator of this game and he does know if it's possible or not.

alt Re: Rotate player

KimKat
GAME BANNED Off Offline

Zitieren
Yasday hat geschrieben
Anyways, it won't work, you cannot change the rot of any player( exept of your own one ).
I think you can do it for all players, as Lua affects all players not just one depending on how to Lua script is built.

Well if it works for one, that's already enough to prove my point that rotation does work on a player...

alt Re: Rotate player

Yasday
User Off Offline

Zitieren
You cannot change the rot of any player, exept of your own one, but only with the mose, got it? That is not possible with Lua.

alt Re: Rotate player

J4x
User Off Offline

Zitieren
Wellknw that we(kimkat and me) know that that's not possible, can u add this to the game DC?

alt Re: Rotate player

KimKat
GAME BANNED Off Offline

Zitieren
Fine be that way.

Why can you then rotate image of the player? haha.
You could then make a player image graphic and rotate it, therefor player rotates, haha. √
Just my regular workaround.

alt Re: Rotate player

KimKat
GAME BANNED Off Offline

Zitieren
Well from sight it will make illusion that player is rotated... therefor interpreted freely by the player. Right?

If not, wth.
haha.

alt Re: Rotate player

archmage
User Off Offline

Zitieren
DC hat geschrieben
(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.)


Maybe a command to set the position of a client's cursor?
1
setcursorpos(id, x, y)

then it would be possible to implement a setrotation function:
1
2
3
4
5
function setrotation(id, angle)
	local x = 320 + 100 * math.cos(angle);
	local y = 240 + 100 * math.sin(angle);
	setcursorpos(id, x, y);
end

alt Re: Rotate player

DC
Admin Off Offline

Zitieren
why the hell should I allow the server to mess with the cursor position of a client?! that would be pretty insane! (and it could actually be abused to annoy players to death)

what do you want to do with that command anyway? I think you either have to forget this plan or you have to find another way to realize it.

alt Re: Rotate player

FlooD
GAME BANNED Off Offline

Zitieren
ya forcing cursor position would be weird... server-side aimbot? lol
1
player(id, "cursor_x"), player(id, "cursor_y")
that would be pretty cool, especially if u can see someone's cursor in spec

alt Re: Rotate player

J4x
User Off Offline

Zitieren
Well, if u don't like that server control other peoples cursor, atleast u can implement some thing like
1
cursor(id,"x"),cursor(id,"y")
, this would be cool to make scripts which need cursor position.

alt Re: Rotate player

Flacko
User Off Offline

Zitieren
FN_Linkin Park hat geschrieben
Well, if u don't like that server control other peoples cursor, atleast u can implement some thing like
1
cursor(id,"x"),cursor(id,"y")
, this would be cool to make scripts which need cursor position.


DC already said that CS2D doesn't send the cursor's position to the server. It only sends the rotation of the player so this is not possible (or DC would have to hack a bit into his code to implement this)

alt Re: Rotate player

Flacko
User Off Offline

Zitieren
Still, what you wanted to achieve is still impossible because the newly-set cursor position will be overriden by the actual mouse position (as DC said).
The only way of doing something like that would be using an OS-dependant API that might not be avaiable in Blitz3D

alt Re: Rotate player

J4x
User Off Offline

Zitieren
yeah u have reason, but im still happy, now it will be easier to simulate something like an airstrike(just put a explosion at mouse position).
Zum Anfang Vorherige 1 2 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht