Forum

> > CS2D > Scripts > object(id,"team") is not working
Forums overviewCS2D overview Scripts overviewLog in to reply

English object(id,"team") is not working

3 replies
To the start Previous 1 Next To the start

old object(id,"team") is not working

Loooser
User Off Offline

Quote
Hi guys i have a little problem:
i want to find out if the object is in the team against the player or not

and i tried these to:
1
2
3
local obt = player(object(b[i],"player"),"team")
                                                              local plt = player(id,"team")
                                                              if plt~=obt then
this one works quite well but only if the the building got build by a player!
1
2
3
local obt =tonumber(object(b[i],"team"))
                                                                 local plt =tonumber( player(id,"team"))
                                                                 if plt~=obt then
This one doesnt work at all! the bots are attacking there own and enemies turrets!

why does the second one not work?
edited 1×, last 17.10.11 07:16:39 pm

old Re: object(id,"team") is not working

Roni
User Off Offline

Quote
you should print the return values of the functions
then you should see why this isnt working(post them here if you still dont get it fixed).
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview