Forum

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

English Objectat

1 reply
To the start Previous 1 Next To the start

old Objectat

G3tWr3ck3d
User Off Offline

Quote
Hey, can someone explain me in a function how is the IMG:https://i.imgur.com/KVWWkTR.png
Objectat command working? Tnx.
edited 1×, last 18.11.14 03:53:24 pm

old Re: Objectat

Rainoth
Moderator Off Offline

Quote
Lets say tile 10|10 is a path and you want to make sure it's not blocked by a wall but a gatefield can be placed.
1
objectID = objectat(10,10)
you get id of an object (not TYPE ID!)
then you want to see if it's a gatefield or not
1
if not object(objectID,"type")==6 then
This will check if it's a gate field and if it's not, you could lets say, destroy the object or maybe hurt the player who built it.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview