Forum

> > CS2D > Scripts > Setpos
Forums overviewCS2D overview Scripts overviewLog in to reply

English Setpos

5 replies
To the start Previous 1 Next To the start

old Setpos

zazz
User Off Offline

Quote
Hello, i'm trying to change some spawns for an event editing a script
New Spawns: TT = 29/243, CT = 56/225..

But i don't know how to do it here.. can anyone do it for me?
1
2
3
4
5
6
7
8
9
10
11
parse('trigger '..triggers.warzone[i])
      end
      for k,v in pairs (player(0,"tableliving")) do
         if player(v,"team") == 1 then
            parse("setpos "..v.." 5520 "..math.random(54,65)*32+16)
         else
            parse("setpos "..v.." 6384 "..math.random(54,65)*32+16)
         end
      end
    end
end

I think the first setpos is for the terrorist team, idk, this is confusing

old Re: Setpos

Cure Pikachu
User Off Offline

Quote
user zazz has written
I think the first setpos is for the terrorist team

You are right. The second is for the CTs (since Spectators are considered dead and therefore not in the
player(0,"tableliving")
table)
user zazz has written
TT = 29/243, CT = 56/225

Is that the X and Y coordinates?

old Re: Setpos

Cure Pikachu
User Off Offline

Quote
OK, at this point it's quite easy, calculator and cs2d cmd setpos are your friends here:
1
2
3
4
5
6
7
for k,v in pairs(player(0,"tableliving")) do
	if player(v,"team") == 1 then
		parse("setpos "..v.." 944 7792")
	else
		parse("setpos "..v.." 1808 7216")
	end
end
Replace your line 3-9 with that.
edited 2×, last 25.07.18 04:36:10 pm

old Re: Setpos

zazz
User Off Offline

Quote
@user Cure Pikachu: Oh wow you made it look so simple, i'm surprised lol.
It's working, thanks alot

By the way, would you mind if i ask you something in PM?

old Re: Setpos

Cure Pikachu
User Off Offline

Quote
user zazz has written
By the way, would you mind if i ask you something in PM?

Sure. Don't count on me being able to fulfill things though.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview