I need a solution like idmypos in acs D:

Discuss all aspects related to modding Zandronum here.
Post Reply
User avatar
ibm5155
Addicted to Zandronum
Posts: 1641
Joined: Tue Jun 05, 2012 9:32 pm
Location: Somewhere, over the rainbow

I need a solution like idmypos in acs D:

#1

Post by ibm5155 » Wed May 29, 2013 11:52 pm

idmypos when actived show on the screen of each player your positions
ex:(player 1 see x:0 y:0 z:0, player 2 see x:200 y:400 z:0, player 3 se,...)

I would need something similar

Code: Select all

script 1 open clientside{
while(true){
  print(s:"X:",f:getactorx(0), s:"\nY:", f:getactory(0), s:"\nZ:", f:getactorz(0));
  delay(1);
}
}
The problem is getactor.(0) will return the position of the activator, only one person should see the right position.
I thinked doing getactorx(ConsolePlayerNumber()) but it returned a 0 value or the server position '-'

Any Idea how to do it work? (That code is just an example, because the original code is too big, and that´s the only part that I don´t know how to solve it)
Projects
Cursed Maze: DONE, V2.0
Zombie Horde - ZM09 map update: [3/15/13]
Need help with English? Then you've come to the right place!

<this post is proof of "Decline">

User avatar
Dusk
Developer
Posts: 581
Joined: Thu May 24, 2012 9:59 pm
Location: Turku

RE: I need a solution like idmypos in acs D:

#2

Post by Dusk » Thu May 30, 2013 12:03 am

OPEN is executed by the world so getactorx(0) doesn't return anything meaningful. ConsolePlayerNumber() returns a player number, not a TID, as it says on the tin.

What you probably want is an enter script.

User avatar
ibm5155
Addicted to Zandronum
Posts: 1641
Joined: Tue Jun 05, 2012 9:32 pm
Location: Somewhere, over the rainbow

RE: I need a solution like idmypos in acs D:

#3

Post by ibm5155 » Thu May 30, 2013 12:20 am

EDIT:
oh, I was reading more about the enter scripts, so you´ll have the tid zero, and it ´ll work :D
but it doesn´t work with clientside enter script '-'
Last edited by ibm5155 on Thu May 30, 2013 12:50 am, edited 1 time in total.
Projects
Cursed Maze: DONE, V2.0
Zombie Horde - ZM09 map update: [3/15/13]
Need help with English? Then you've come to the right place!

<this post is proof of "Decline">

Post Reply