Gamestudio Links
Zorro Links
Newest Posts
freewhyblogelsewhere
by 9489cpjf. 06/03/24 06:06
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,075 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19056 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
getting player coordinates (x,y,z) #166897
11/11/07 01:03
11/11/07 01:03
Joined: Nov 2007
Posts: 73
I
immolat3 Offline OP
Junior Member
immolat3  Offline OP
Junior Member
I

Joined: Nov 2007
Posts: 73
Hey, I am in a game developement class at Drexel University, in Philadelphia, and our game is a third person action shooter where there's nothing but big boss fights, ala Shadows, and we have a weapon in the game that if you are aiming at something it teleports you with the object when you fire the gun if its able to switch places with that object.

basically i am trying to make it so when i press a key it will display the players x,y, and z coordinates and i cant figure even that part out. im still new to this language so any help would be awesome.

Re: getting player coordinates (x,y,z) [Re: immolat3] #166898
11/11/07 01:04
11/11/07 01:04
Joined: Nov 2007
Posts: 73
I
immolat3 Offline OP
Junior Member
immolat3  Offline OP
Junior Member
I

Joined: Nov 2007
Posts: 73
actually if anyone has any ideas on how to do anyof this, let me know

Re: getting player coordinates (x,y,z) [Re: immolat3] #166899
11/11/07 01:32
11/11/07 01:32
Joined: Mar 2005
Posts: 84
The Sacred Silence and Sleep
Spectre Offline
Junior Member
Spectre  Offline
Junior Member

Joined: Mar 2005
Posts: 84
The Sacred Silence and Sleep
Assuming "player=my;" :

Code:
panel PlayerLocPan
{
digits(10,10,6,*,1,my.x);
digits(10,30,6,*,1,my.y);
digits(10,50,6,*,1,my.z);
flags = visible;
}



Would show the players coordinates in the level at all times. Not hard to map the visibility of the panel to a key.

Hope that helped!

Re: getting player coordinates (x,y,z) [Re: Spectre] #166900
11/11/07 01:34
11/11/07 01:34
Joined: Nov 2007
Posts: 73
I
immolat3 Offline OP
Junior Member
immolat3  Offline OP
Junior Member
I

Joined: Nov 2007
Posts: 73
Ok awesome! Now, how would i get each of those into a variable...

something like

xVar = my.x;

??

Re: getting player coordinates (x,y,z) [Re: immolat3] #166901
11/11/07 01:49
11/11/07 01:49
Joined: Mar 2005
Posts: 84
The Sacred Silence and Sleep
Spectre Offline
Junior Member
Spectre  Offline
Junior Member

Joined: Mar 2005
Posts: 84
The Sacred Silence and Sleep
Just like that really...
In a function as long as the variable was declared you could just type what you just did...

function WhatHaveYou()
{
...... // some code
xVar = my.x,
xVar = my.y;
etc.
...... // more code
}

If I may direct you to AUM 59 you can read the workshop about weapons using c_trace which should help immensely in your transporter idea. I'm a terrible coder and I've already figured out a way to acclomplish that

Re: getting player coordinates (x,y,z) [Re: Spectre] #166902
11/11/07 04:37
11/11/07 04:37
Joined: Nov 2007
Posts: 73
I
immolat3 Offline OP
Junior Member
immolat3  Offline OP
Junior Member
I

Joined: Nov 2007
Posts: 73
wow! thanks so much! i know what you mean, i am just a web developer, but luckily some of this stuff caries over. long story short, our programmer dropped out and i was the only one with ANY coding experience, so i am trying to pick up the pieces. i will let you know how it turns out ;P

thanks so much!

Re: getting player coordinates (x,y,z) [Re: immolat3] #166903
11/11/07 19:40
11/11/07 19:40
Joined: Nov 2007
Posts: 73
I
immolat3 Offline OP
Junior Member
immolat3  Offline OP
Junior Member
I

Joined: Nov 2007
Posts: 73
it keeps showing all three coords as 0.

any ideas?

Re: getting player coordinates (x,y,z) [Re: immolat3] #166904
11/11/07 20:08
11/11/07 20:08
Joined: Nov 2007
Posts: 73
I
immolat3 Offline OP
Junior Member
immolat3  Offline OP
Junior Member
I

Joined: Nov 2007
Posts: 73
=(

Re: getting player coordinates (x,y,z) [Re: immolat3] #166905
11/11/07 20:31
11/11/07 20:31
Joined: Nov 2007
Posts: 73
I
immolat3 Offline OP
Junior Member
immolat3  Offline OP
Junior Member
I

Joined: Nov 2007
Posts: 73
Basically I have

panel showXYZ()
{
digits(10,10,6,*,1,my.x);
digits(10,30,6,*,1,my.y);
digits(10,50,6,*,1,my.z);
flags = visible;
}

starter showPlayerXYZ(){
while(1){
showXYZ.visible = on;
showXYZ.refresh = on;
wait(1);
}


and that just displays three 0's

Re: getting player coordinates (x,y,z) [Re: immolat3] #166906
11/11/07 20:56
11/11/07 20:56
Joined: Nov 2007
Posts: 73
I
immolat3 Offline OP
Junior Member
immolat3  Offline OP
Junior Member
I

Joined: Nov 2007
Posts: 73
nvm figured it out


Gamestudio download | chip programmers | 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