Gamestudio Links
Zorro Links
Newest Posts
Zorro version 3.0 prerelease!
by Grant. 02/24/26 22:21
WFO Training with parallel cores Zorro64
by Martin_HH. 02/24/26 19:51
ZorroGPT
by TipmyPip. 02/23/26 21:52
Camera always moves upwards?
by clonman. 02/21/26 09:29
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 5,706 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Maus position Problem #123773
04/14/07 07:27
04/14/07 07:27
Joined: Feb 2006
Posts: 385
Oldenburg,Germany
Ralph Offline OP
Senior Member
Ralph  Offline OP
Senior Member

Joined: Feb 2006
Posts: 385
Oldenburg,Germany
Hallo,
ich möchte ein Haus bevor ich es baue an die Maus hängen...
und dazu benutze ich den Code hier:
Code:
  
temp.x = mouse_pos.X; //habs auch schon mit pointer probiert
temp.y = mouse_pos.Y;
vec_for_screen(temp,camera);
temp.z = 10;
vec_set(crea_building.pos,temp);



Das funktioniert aber nicht so gut, könnt ihr mir sagen wie ich es richtig hinbekomme das sich die Entity auch an der Maus Position aufhält?

Vielen dank im voraus.
MFG Ralph

Re: Maus position Problem [Re: Ralph] #123774
04/14/07 09:58
04/14/07 09:58
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline
User
tompo  Offline
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
while(1)
{
MOUSE_POS.X = POINTER.X; MOUSE_POS.Y = POINTER.Y;
temp.x = MOUSE_POS.x;
temp.y = MOUSE_POS.y;
temp.z = 10;
vec_for_screen(temp,CAMERA);
vec_set(my.x, temp);

wait(1);
}


Never say never.
Re: Maus position Problem [Re: tompo] #123775
04/14/07 10:03
04/14/07 10:03
Joined: Feb 2006
Posts: 385
Oldenburg,Germany
Ralph Offline OP
Senior Member
Ralph  Offline OP
Senior Member

Joined: Feb 2006
Posts: 385
Oldenburg,Germany
Das gleiche habe ich doch schon.
mouse_pos.x = pointer.x ... hab ich in die main while schleife geschrieben.

MFG Ralph

Re: Maus position Problem [Re: Ralph] #123776
04/14/07 10:10
04/14/07 10:10
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline
User
tompo  Offline
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
english please ich spreche deutch nicht besonders
or wait for german speaking people


Never say never.
Re: Maus position Problem [Re: tompo] #123777
04/14/07 10:12
04/14/07 10:12
Joined: Feb 2006
Posts: 385
Oldenburg,Germany
Ralph Offline OP
Senior Member
Ralph  Offline OP
Senior Member

Joined: Feb 2006
Posts: 385
Oldenburg,Germany
i have the same.
mouse_pos.x = pointer.x is in my main while
Code:
  
function main(){
....
while(1){
mouse_pos.x = pointer.x;
mouse_pos.y = pointer.y;
wait(1);
}



Edit:
but it doesnt work good,
the house(entity) is only in the middle of the screen.
I dont know why, i think it is a Code problem

Last edited by Ralph; 04/14/07 10:13.
Re: Maus position Problem [Re: Ralph] #123778
04/14/07 10:14
04/14/07 10:14
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline
User
tompo  Offline
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
and... what you problem is?
code doesn't work or what?


Never say never.
Re: Maus position Problem [Re: Ralph] #123779
04/14/07 10:17
04/14/07 10:17
Joined: Feb 2006
Posts: 385
Oldenburg,Germany
Ralph Offline OP
Senior Member
Ralph  Offline OP
Senior Member

Joined: Feb 2006
Posts: 385
Oldenburg,Germany
I edit the post..
here is what i edit:
but it doesnt work good,
the house(entity) is only in the middle of the screen.
I dont know why, i think it is a Code problem

Sorry my english is very bad...

Re: Maus position Problem [Re: tompo] #123780
04/14/07 10:21
04/14/07 10:21
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline
User
tompo  Offline
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
what version of gs you have?
if older one, maybe you have to use mouse_to_level function
and check the mouse_mode you have! 0 or 1 is for you.
I've pasted this code from one of mine and everything works well.


Never say never.
Re: Maus position Problem [Re: tompo] #123781
04/14/07 10:26
04/14/07 10:26
Joined: Feb 2006
Posts: 385
Oldenburg,Germany
Ralph Offline OP
Senior Member
Ralph  Offline OP
Senior Member

Joined: Feb 2006
Posts: 385
Oldenburg,Germany
the version is:
GameStudio Standard 6.10.0/WED V6.11

Re: Maus position Problem [Re: Ralph] #123782
04/14/07 10:28
04/14/07 10:28
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline
User
tompo  Offline
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
it means older one...
i dont't remember those times good...
but try mouse_to_level function or check this function in help


Never say never.
Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1