Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Author Topic: How can I know the location of entities?  (Read 4584 times)

0 Members and 1 Guest are viewing this topic.

A.Y.

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 27
    • View Profile
    • http://www.free-lance.ru/users/Yar/info/
How can I know the location of entities?
« on: January 24, 2008, 12:41:15 AM »

How can I know the location of entities?

on "LeftClick"
 if (this.X == 280, this.X == 311)
{
this.SkipTo(380, 311);
}
else
{
this.SkipTo(280, 311);
}

I am doing so, but of course it does not work.

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: How can I know the location of entities?
« Reply #1 on: January 24, 2008, 08:50:49 AM »

what are you trying to do? you can't use , in if clause...
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

A.Y.

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 27
    • View Profile
    • http://www.free-lance.ru/users/Yar/info/
Re: How can I know the location of entities?
« Reply #2 on: January 24, 2008, 10:08:22 AM »

I need to make a free entities who commits leap,
from the point at the point in a certain order.

on "LeftClick"
 if (this.X == 280, this.Y == 311)
{
this.SkipTo(380, 311);
}
else (this.X == 380, this.Y == 311)
{
this.SkipTo(480, 311);
}
and so on ...

But still not working.
« Last Edit: January 24, 2008, 10:23:37 AM by A.Y. »
Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: How can I know the location of entities?
« Reply #3 on: January 24, 2008, 10:30:47 AM »

Are you testing for entities coordinates? Then use this:

Code: [Select]
on "LeftClick"
{
  if (this.X == 280 && this.Y == 311) this.SkipTo(380, 311);
  else
   if (this.X == 380 && this.Y == 311) this.SkipTo(480, 311);
}

Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: How can I know the location of entities?
« Reply #4 on: January 24, 2008, 10:34:20 AM »

Also I recommend you reading chapter from my online book "Survivor's guide to scripting".  You need to learn propper syntax for your commands and this could save you many problems down the road.
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

A.Y.

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 27
    • View Profile
    • http://www.free-lance.ru/users/Yar/info/
Re: How can I know the location of entities?
« Reply #5 on: January 24, 2008, 10:45:44 AM »

Thank you very much.
With great interest I read all of your guideline,
Unfortunately, I still very far from understanding the art of programming.
 

Page created in 0.038 seconds with 21 queries.